2144 Commits

Author SHA1 Message Date
MohitMaliFtechiz
50eeddd314 Fixed: The chooser UI now defaults to displaying external storage.
* Previously, it displayed the last known location when selecting a folder for external storage, which could confuse the user. We have now resolved this by defaulting to opening the SD card when choosing the SD card folder.
2023-12-19 19:38:32 +05:30
MohitMaliFtechiz
2423b6b683 * Fixed: Made a small improvement to the sidebar entries for "About the app" and "Support app."
* Introduced the 'Support kiwix' option, which is configurable in the navigation for custom apps. If the custom app is set to display the "Support" menu item in navigation, it will be shown; otherwise, it will be hidden from the app.
* Replaced the "kiwix" and "the" prefixes in "Support kiwix" and "About the app" with the app name in the navigation.
2023-12-15 16:44:25 +05:30
translatewiki.net
6bd22da364 Localisation updates from https://translatewiki.net. 2023-12-14 15:15:52 +01:00
MohitMaliFtechiz
ced2182301 Fixed Zimit archives are not displaying correctly.
* The getEntryByPath method was being called twice when retrieving content. Consequently, the initial call returned the content entry URL with additional parameters. Subsequently, when making the second call with the provided URL, it resulted in an "entry not found" exception. This issue prevented the loading of the CSS and content of the Zim file.
* Additionally, the getActualUrl method was primarily implemented to retrieve the redirect entry of the URL provided by the webView. It is unnecessary to invoke this method when obtaining content.
2023-12-14 15:06:29 +01:00
MohitMaliFtechiz
90dc8ec292 Enhanced the visibility of the ZIM file on the help screen for testability.
* Introduced test cases for the new functionality to ensure its expected behavior in both variants, such as Play Store and non-Play Store.
* Updated other test cases to accommodate the testing of this new functionality.
2023-12-14 15:03:01 +01:00
MohitMaliFtechiz
c20b40e389 Added a button to the startup message dialog to directly open the Kiwix website for downloading the APK. This will make it easier for the user who wants to download the full APK version of the Kiwix app. 2023-12-14 15:03:01 +01:00
MohitMaliFtechiz
4d47198b90 Introducing the startup message dialog that shows the restrictions of the Play Store to the user. 2023-12-14 15:03:01 +01:00
MohitMaliFtechiz
a736a7bdea Fixed the URL shown in the help option and made it clickable to directly open our official website for downloading the APK. 2023-12-14 15:03:01 +01:00
MohitMaliFtechiz
7d276658d4 Fixed Start-up message to inform about the restrictions on the Google Store app to open sideloaded ZIM files.
* Showing play store restriction to the users in the help screen in play store variant.
2023-12-14 15:03:01 +01:00
MohitMaliFtechiz
25eab4e5fb Introduced the 'About the app' option in the navigation for custom apps.
* If the custom app is configured to display the 'About the app' option in navigation, it will be visible. Clicking on it will redirect the user to the configured URL.
2023-12-14 12:44:05 +05:30
MohitMaliFtechiz
fc6740e4eb Fixed version 3.8.1 from Google Play cannot find zim on SD card that are copied to app-specific directory.
* Scan the app-specific directory as well because we have limitations in scanning all directories on Android 11 and above in the Play Store variant. If a user copies the ZIM file to the app-specific directory on the SD card, the scanning of the app-specific directory on the SD card has not been added, resulting in the copied files not being displayed on the library screen. Therefore, we need to explicitly include the app-specific directory for scanning.
2023-12-14 07:55:52 +01:00
MohitMaliFtechiz
1b6be45826 Fixed LocalLibraryTest that was failing. 2023-12-14 07:51:52 +01:00
MohitMaliFtechiz
736d95285d Fixed unable to open zim files on sd card in version 3.8.1
* If the ManageExternalStorage permission has not been granted, introduce the request, particularly when accessing features that necessitate this permission, such as downloading ZIM files, selecting a ZIM file from storage via the file picker, and refreshing the list of available ZIM files in storage.
2023-12-14 07:51:52 +01:00
MohitMaliFtechiz
a07bb680c3 Introduced a mutex to manage concurrency in the search functionality. This enables proper clearing of the first running job before executing a new one. By implementing this approach, we ensure that access to the libzim search results occurs one at a time, resolving the crashing issue caused by multiple attempts to access libzim resources.
* Replaced the `cancel` function for the Job with `cancelAndJoin`, ensuring that it thoroughly cancels the first job before initiating the new task.
2023-12-12 15:31:53 +05:30
MohitMaliFtechiz
6d5e50d0ef Fixed the SearchStateTest was failing due to improvements in the search loading functionality. 2023-12-11 19:12:18 +05:30
MohitMaliFtechiz
0bc1392f1b Fixed the app crashes that occurred when deleting letters in a search.
* Removed the unnecessary estimation matches call on `libkiwix`, as we do not need this since `libkiwix` can handle this automatically.
* Cancelled the previously running job if a new searchTerm is in progress; this will avoid unnecessary memory allocation and data load on libkiwix.
2023-12-11 18:04:04 +05:30
Shreyas Patil
1a13516fcd Improved Sidebar icon for Support Kiwix 2023-12-10 02:13:48 +05:30
MohitMaliFtechiz
bbcf8bea8c Added a placeholder for search in custom apps.
* Introduced a search placeholder for custom apps; if any custom app is configured not to show the title in the toolbar, it will display the search placeholder with a border. To implement this change, a layout has been added inside the toolbar.
* To enhance understanding of this change, proper comments have been added to the methods.
2023-12-06 16:00:35 +05:30
MohitMaliFtechiz
88475d8601 The app icon will no longer automatically be replaced with three lines after closing the tabs screen in custom apps when the custom app is configured not to show the title. 2023-12-06 16:00:28 +05:30
MohitMaliFtechiz
2c1c678819 Fixed code formatting issue. 2023-12-06 16:00:22 +05:30
MohitMaliFtechiz
cd7b988fe1 Adjusted the size of the hamburger icon. * To address unexpected behavior, where setting the icon directly to the hamburger resulted in it taking the full width and height of the toolbar, we resized the app icon and applied it to the hamburger icon. 2023-12-06 16:00:15 +05:30
MohitMaliFtechiz
f46f2f324b Introduced the disable title option for custom apps. 2023-12-06 16:00:07 +05:30
MohitMaliFtechiz
952b539fa8 Adjusted the zone for triggering search suggestions.
* We had restricted the toolbar click to the toolbar title. So, if the user clicked on the title, it would initiate the search. Now, we have removed the restriction of clicking only on the title. If the user taps anywhere on the toolbar except the menu items and hamburger, it will initiate the search.
2023-12-06 15:59:59 +05:30
translatewiki.net
e2585529d2 Localisation updates from https://translatewiki.net. 2023-12-01 21:05:15 +01:00
MohitMaliFtechiz
c90c6312f4 Fixed unit test cases.
* Fixed: `Search action is debounced` test.
* Fixed: `SearchState combines sources from inputs` test.
2023-11-29 19:29:20 +05:30
MohitMaliFtechiz
c3da77b596 Added unit test cases to properly test the search functionalities scenario. 2023-11-29 18:48:40 +05:30
MohitMaliFtechiz
a1df0fedfe Implemented debouncing mechanism for the search functionality.
* Implemented a debouncing mechanism to enhance the handling of search functionalities. This approach is employed to prevent unnecessary data loads from libkiwix, addressing the issue of crashes when users rapidly type and search for results.
2023-11-29 14:56:55 +05:30
MohitMaliFtechiz
a9088c0918 Fixed, Sidebar adds unwanted space after closing the full screen mode.
* Previously, when exiting full-screen mode, the `WindowCompat.setDecorFitsSystemWindows` configuration was set to `false`, causing a blank space between the sidebar logo and the Bookmark item.
* This change sets the configuration to `true` when exiting full-screen mode to ensure proper adjustment of the sidebar content, eliminating the undesired blank space.
* The adjustment is necessary to maintain a seamless layout and appearance, particularly after transitioning from full-screen mode.
2023-11-21 21:24:19 +01:00
MohitMaliFtechiz
52fefe7df7 Moved version-related properties from individual build.gradle files to a common configuration file (Config.kt).
* The `Config.kt` now holds the version information we can directly change the versionCode here and it will automatically replace in both gradle files.
* Removed duplicate version configurations from build.gradle files.
2023-11-21 12:44:37 +05:30
MohitMali
65c262e1aa Fixed the lines skip issue in read aloud feature.
* The issue was caused by an unnecessary increment of the 'currentPiece' index in the onDone callback of the TextToSpeech engine. This double increment led to the skipping of lines. The redundant increment at the end of the method has been removed, ensuring that each line is read correctly.
2023-11-20 18:39:28 +01:00
MohitMali
baf2429fa3 Fixed, Using TTS on Wikivoyage 2023-06 (Android 13) reads code aloud. 2023-11-20 18:39:28 +01:00
Emmanuel Engelhart
45c12e7272
Bump-up version to 3.8.0 2023-11-20 16:34:15 +01:00
MohitMali
c4f5b3f978 Fixed, the search is not working in dwds app.
* We now utilize `AssetFileDescriptor` to open the ZIM file for custom apps. For the search functionality, we are creating a reader with a file object, but we need to create a reader with the `AssetFileDescriptor` instead of a file for custom apps.
2023-11-17 21:01:50 +05:30
MohitMali
4a9682427f Added comments on CoreReaderFragment method that are implemented in CustomReaderFragment. 2023-11-16 19:10:34 +05:30
MohitMali
748f0c4d5f Moved openSearchItem, findInPage functionality to our CoreReaderFragment as we were using same code twice for these methods in app and custom module. 2023-11-16 19:10:02 +05:30
MohitMali
f6b01a4f28 Fixed, I can't open Zim from an external download.
* We are now using fileDescriptor to open the zim files with uris when someone tries to open the zim file directly from storage.
* As now we are using the assetFileDescriptor instead of direct files, we have refactored the functionality of saving (note, history, bookmark) so that we can open the same pages on the same zimFile.
2023-11-16 18:10:53 +05:30
MohitMali
8b1cb8bc7e We are temporary hiding the kiwixServer feature from Custom Apps.
* Since we are now using fd (FileDescriptor) to read the zim file from the asset folder. Currently, 'KiwixServer' is unable to host zim files via fd. This feature is temporarily hidden for custom apps. We will re-enable it for custom apps once the issue is resolved.
2023-11-12 18:06:05 +01:00
MohitMali
bdb00d7aae Fixed the issue where the Zim File was not displaying in the ZimHostFragment for custom apps.
* In `ZimHostFragment`, we show Zim files that are saved in the database. These files are typically saved when downloading Zim files. In a custom app, where Zim files are already included within the app and not downloaded separately that's why they are not showing on the `ZimHostFragment`, we have addressed this issue by saving the Zim files in the database to ensure they appear in the `ZimHostFragment`.
* Regarding the `FileDescriptor`, there are no file objects available because we read Zim files using `FileDescriptor`. To address this, we have created a `demo.zim` file to save it in the database so that it will be displayed in the `ZimHostFragment`. We handle this file within the `KiwixServer`. When the current Zim file is `demo.zim`, we create an `Archive` object with the `FileDescriptor` to host the Zim file on the `KiwixServer`.
2023-11-12 18:06:05 +01:00
MohitMali
845f19eab6 Fixed #3519.
* The problem was that we were saving the note name combined with `zimFileTitle` and `articleTitle`. When opening the saved note from `NotesFragment`, it retrieved the `noteTitle` from the database, which already contained the combined name. Subsequently, when saving the note again, it redundantly combined the name. To resolve this issue, we now extract the `articleName` when updating notes in `NotesFragment`, ensuring that it updates existing notes instead of creating new ones.
2023-11-12 18:06:05 +01:00
MohitMali
b6d718f287 Fixed note saving with FileDescriptor.
* Now we are using fileDescriptor for custom apps to read zim file from asset folder, so we have improved our notes saving functionality according to this change.
2023-11-12 18:06:05 +01:00
MohitMali
f31535966b Using AssetFileDescriptor instead of ParcelFileDescriptor. 2023-11-12 18:06:05 +01:00
MohitMali
c8b98cc504 Using ParcelFileDescriptor instead of FileDescriptor.
* Telling android to not compress the `.zim` files in asset folder while building the apk/bundle.
2023-11-12 18:06:05 +01:00
MohitMali
99614ed88f Introducing reading zim file content through fileDescriptor instead of creating a file to avoid using storage twice for same zim file. 2023-11-12 18:06:05 +01:00
MohitMali
4c8f7cb02c Fixed the redundancy of the 'All-Books-Mode' option for Bookmarks, Notes, and History in custom apps.
* Since custom apps only have a single zim file, there is no need to display these switches, which can potentially confuse users. Therefore, we have hidden these switches in custom apps.
2023-11-12 18:04:22 +01:00
MohitMali
c3049a6a59 Fixed memory leak on API level 24.
*  When the application goes in the background from `ZimHostFragment`, `KiwixReaderFragment/ZimHostFragment` without starting the Service then the `ReadAloudService`, and `HotspotService` variables are not used and GC try to clear those objects but we are not clearing those objects, that's why memory leak is happening. So now we have free those objects if they are not in use.
2023-11-11 08:48:22 +01:00
MohitMali
3432b32431 Improved ZimHostFragmentTest to properly test the server functionality.
* Created a new class to match the how many checkbox is checked in the recyclerview, it will also help to test this type of functionality in future.
2023-11-11 08:48:22 +01:00
MohitMali
59e474ed64 Checkbox always visible to user in Wifi Hotspot and user can select and unselect zim files when server already started 2023-11-11 08:48:22 +01:00
MohitMali
b00e335221 Fixed Hosted Books don't update on Application 2023-11-11 08:48:22 +01:00
translatewiki.net
3babc62cc0 Localisation updates from https://translatewiki.net. 2023-11-09 13:10:23 +01:00
MohitMali
99e11d97d9 Saving 'Recent Searches' in the background.
* Previously, we were saving the 'recentSearches' in ObjectBox, and then we were opening the 'searchedPage,' which slowed down the displaying of the results for the user. To address this issue, we are now saving 'recentSearches' in the background, ensuring that it will not impact the end user.
* since we are now directly using the URLs provided by the 'searchSuggestion,' and those URLs are already decoded, our 'URLDecoder.decode()' method will fail to decode URLs containing '%' symbols, as they are already decoded, for example, 'https://kiwix.app/A/FT%.' To resolve this issue, we have modified our 'decodeUrl' extension function to return the same URL if it is already decoded.
2023-10-31 13:29:36 +01:00