8243 Commits

Author SHA1 Message Date
MohitMaliFtechiz
1791911f13 Fixed: infinite loop and improve error handling for fetching random article.
* Fixed an issue where the app would enter an infinite loop when the zimFileReader was null, causing a crash.
* Improved the condition to check if zimFileReader is null and show a proper error message to the user without retrying.
* Added a retry mechanism to attempt fetching the random article twice in case of an internal error in libzim.
* After two failed attempts, an error message is displayed to the user if the random article is not found.
2025-01-19 17:07:56 +01:00
Kelson
ef1239fa4a
Merge pull request #4167 from kiwix/Fixes#4166
Fixed: Application crash while adding application shortcuts.
2025-01-19 17:07:05 +01:00
MohitMaliFtechiz
08e004a819 Fixed: Application crash while adding application shortcuts.
* Using the `ShortcutManagerCompat` class to add dynamic shortcuts instead of directly using the `ShortcutManager` class, as it provides better handling for adding shortcuts.
* The issue occurred because these shortcuts were defined in the manifest, which treated them as immutable and unable to be updated. We removed them from the manifest and added them as dynamic shortcuts. On some devices (e.g., Honor devices), it takes time to remove these shortcuts from the static shortcut list after the user updates the app, causing them to be treated as immutable and unable to be updated. This led to the crash. To fix this, we updated our shortcut IDs so that when the previous static shortcuts are removed by the OS, it will not affect the creation of the new dynamic shortcuts.
* For previously added dynamic shortcuts on other devices, we implemented a removeOutdatedIdShortcuts() method, which removes the old dynamic shortcuts.
2025-01-19 17:06:09 +01:00
Kelson
bcc6ac88ce
Merge pull request #4168 from kiwix/Fixes#4128
Changed the website, and Nightly APKs name.
2025-01-19 17:05:16 +01:00
MohitMaliFtechiz
12c0e17197 Changed the website, and Nightly APKs name.
* Before the name was `kiwix-3.13.0.apk` for the release APK(with app id org.kiwix.kiwixmobile app id) we were uploading on the website. But now, we are uploading the standalone APK on the website(with org.kiwix.kiwixmobile.standalone app id) it is a breaking change, and users are not aware of it. So we are changing the APK name so that users can understand this change.
* Renamed the nightly APK since there also we are uploading the standalone APK.
2025-01-19 16:20:53 +01:00
Kelson
1949d29973
Merge pull request #4170 from kiwix/Fixes#4045
Showing a warning dialog when copying/moving the ZIM chunks in PS version.
2025-01-19 16:20:29 +01:00
MohitMaliFtechiz
4fe022c6a2 Improved the message of Warning dialog to show user where they can verify the ZIM chunks are copied/moved properly. 2025-01-19 16:19:49 +01:00
MohitMaliFtechiz
c69efb1523 Improved the showing of the warning dialog so that all the instructions are clear to the user. 2025-01-19 16:19:49 +01:00
MohitMaliFtechiz
10734ec75f Improved the warning message we are showing to the user after copying/moving the ZIm chunks. 2025-01-19 16:19:49 +01:00
MohitMaliFtechiz
4e16102bc4 Improved the copying/moving of ZIM chunks.
* Now all the ZIM chunks are copying/moving correctly.
* Improved the warning message to inform user what should they do after copying/moving all the ZIM chunks.
* Implement a feature to directly view the copied/moved ZIM chunks by clicking on the button in warning dialog.
2025-01-19 16:19:49 +01:00
MohitMaliFtechiz
be81ca5405 Showing a warning dialog when copying/moving the ZIM chunks in PS version. 2025-01-19 16:19:49 +01:00
Kelson
1ec8f2cd00
Merge pull request #4172 from kiwix/Fixes#4146
Added a section in the README file to showcase the two variants of our application.
2025-01-19 16:19:23 +01:00
Emmanuel Engelhart
aedfb8dae8
Light simplification 2025-01-19 16:18:59 +01:00
MohitMaliFtechiz
1f322aa1f9 Added a section in the README file to showcase the two variants of our application.
* It explains why we introduced two variants, highlights the differences between them, and provides guidance on how users can transfer their content from the previous app to the new app.
2025-01-19 15:52:31 +01:00
Kelson
6933feb9e1
Merge pull request #4179 from kiwix/Fixes#3531
Added a third intro screen to inform users about changing the storage location for downloading ZIM files.
2025-01-18 12:02:17 +01:00
MohitMaliFtechiz
8195194f48 Refactored the IntroFragmentTest to test this new screen. 2025-01-18 15:05:03 +05:30
MohitMaliFtechiz
75b63c069c Added a third intro screen to inform users about changing the storage location for downloading ZIM files. 2025-01-18 14:49:10 +05:30
Kelson
c069a129e8
Merge pull request #4177 from kiwix/improvement_in_showing_download_notification
Improved handling of completed and canceled download notifications(When app is in background or closed).
2025-01-18 08:15:45 +01:00
MohitMaliFtechiz
eb0f247ff0 Improved handling of completed and canceled download notifications.
* Fixed an issue where the notification for a completed download would disappear when the same notification ID was used for the foreground service.
* Enhanced the cancellation logic to immediately remove the ongoing download notification when the user cancels a download and no other downloads are active. This resolves the delay (2-3 seconds) that occurred when the notification was set as the foreground notification.
* Added the necessary comments in methods to understand this fix.
2025-01-16 18:08:27 +05:30
Kelson
bff8a97055
Merge pull request #4176 from kiwix/Fixes#4175
Fixed: The ZIM file was displayed on the library screen but failed to open (the ZIM file was located in the SD card's trash folder).
2025-01-16 10:10:58 +01:00
MohitMaliFtechiz
8ded3d350a Fixed: Failing unit test case.
* Added a new unit test to verify that books located in the trash folder do not appear on the library screen.
2025-01-16 11:41:06 +05:30
MohitMaliFtechiz
6c1b82da3d Fixed: The ZIM file was displayed on the library screen but failed to open (the ZIM file was located in the SD card's trash folder).
* Improved the scanning process for ZIM files to reduce scan time by excluding hidden folders, which are unnecessary and caused delays in scanning.
* Updated MediaStore to exclude ZIM files located in the SD card's trash folder, addressing the issue.
* Refactored the NewBookDao to remove any ZIM files from the library screen if they are located in the trash folder.
2025-01-15 20:46:23 +05:30
Kelson
283d845a6d
Merge pull request #4144 from kiwix/translatewiki
Localisation updates from https://translatewiki.net.
2025-01-07 07:45:25 +01:00
MohitMaliFtechiz
16ea590c8c Updated the documentation for pref_free_storage. 2025-01-07 11:36:02 +05:30
translatewiki.net
6e09c1a353 Localisation updates from https://translatewiki.net. 2025-01-07 11:35:15 +05:30
Kelson
1e5bc58f15
Merge pull request #4164 from kiwix/Fixes#4163
Fixed: Application crash caused by "Input dispatching timed out" while retrieving storageDeviceList information in the online library.
2025-01-06 20:38:00 +01:00
MohitMaliFtechiz
7f6f0d4347 Fixed: Application crash caused by "Input dispatching timed out" while retrieving storageDeviceList information in the online library.
* Moved the storage device retrieval to the IO thread.
* Updated the StorageDeviceUtils.getWritableStorage method to a suspend function to ensure execution on the IO thread.
* Refactored CopyMoveFileHandler, OnlineLibraryFragment, KiwixPrefsFragment, and LocalLibraryFragment to adapt to this change.
* Optimized storage device retrieval by caching it in the main activity and reusing it across fragments to enhance performance, especially with large SD cards.
* Refactored the CopyMoveFileHandlerTest.
* Improved the showing of storage device list.
2025-01-06 21:39:34 +05:30
Kelson
3c4614e3d7
Merge pull request #4156 from kiwix/Fixes#4120
Added functionality to generate APK for a specified date.
2025-01-06 13:26:19 +01:00
MohitMaliFtechiz
0ec90f06b0 Added logs to check whether the environment variable is set, for debugging purposes.
* Improved the ID of the "Retrieve date from git revision" job.
* Removed unnecessary conditions from the workflow.
2025-01-06 13:17:16 +05:30
MohitMaliFtechiz
befd7d389a The testing_release job is skipped, if the application is being uploaded with the same version as the previously uploaded one, and Play Store gives the error for same version code. This prevents the CD pipeline from failing due to this error, while for all other errors, the workflow will fail as expected. 2025-01-04 16:24:47 +05:30
MohitMaliFtechiz
66f3d4d7cd Refactored all CD pipelines to generate APKs and app bundles based on the relevant git revision.
* The date is extracted from the specified git revision and set in the `KIWIX_ANDROID_RELEASE_DATE` environment variable, and the version code is generated for that date.
* This feature has been added to the Release section in the README file.
2025-01-04 12:24:26 +05:30
MohitMaliFtechiz
ce830093f9 Made the LAST_DATE const so that it can not be changed. 2025-01-04 10:02:29 +05:30
MohitMaliFtechiz
40285a7cfd Documented this new feature in the README.md file so that this feature can be easily used. 2025-01-04 10:02:19 +05:30
MohitMaliFtechiz
a371ae6d67 We refactored our dummy_bundle.yml workflow to generate the dummy bundle and APKs based on a specified date, using a new tag format dummy_bundle_and_apk_v*, where * is replaced by the date in YYYY_MM_DD. This date is extracted and set as an environment variable to generate the app bundle and APK for that date, defaulting to the current date if no date is provided.
* Now, our `dummy_bundle.yml` will generate both the app bundle and APKs, so if we need the APK for a specified date, we can easily retrieve it.
* Added comments in both workflows to understand the flow of the workflows.
2025-01-04 10:02:05 +05:30
MohitMaliFtechiz
ae7988f112 Refactored testing_release CD workflow to generate and publish the application on the Play Store based on a specified date, using a new tag format internal_testing_v* where * is replaced by the date, which is extracted and set as an environment variable to generate the app bundle for that date, defaulting to the current date if no date is provided, and uploading the generated app bundle to the Play Store. 2025-01-04 10:01:55 +05:30
MohitMaliFtechiz
caa45c5f51 Renamed the environment variable to KIWIX_ANDROID_RELEASE_DATE.
* Made `LAST_DATE` and `BASE_VERSION_CODE` constants, as these values are crucial for our app and should not be changed. We have marked them as constants and added comments to ensure they remain unchanged.
2025-01-04 10:01:40 +05:30
MohitMaliFtechiz
29616b1cf7 Fixed: Reproducible Builds.
* To generate the APK for a specific date, set the "RELEASE_DATE" environment variable in the format `YYYY-MM-DD`. The APK will be generated for the specified date. If the variable is not set, the APK will be generated for the current date.
2025-01-04 10:01:32 +05:30
Kelson
359a1fc4bc
Merge pull request #4147 from kiwix/Fixes#3990
Added support for Android 15.
2025-01-03 17:07:24 +01:00
MohitMaliFtechiz
cd6d5e2604 Re-enabled the all emulators in CI. 2025-01-03 17:06:48 +01:00
MohitMaliFtechiz
93f4a51013 Fixed the testOpeningFromFileManager was failing on Android 15. 2025-01-03 17:06:48 +01:00
MohitMaliFtechiz
dfabe27a91 Added Android 15 emulator in CI to run the test cases on Android 15 device. 2025-01-03 17:06:48 +01:00
MohitMaliFtechiz
60d1ee26c6 Fixed: PageViewModelTest which was failing. 2025-01-03 17:06:48 +01:00
MohitMaliFtechiz
3b24308c92 Fixed: ZimManageViewModelTest, NewRecentSearchDaoTest, and SearchViewModelTest, etc, which were failing. 2025-01-03 17:06:48 +01:00
MohitMaliFtechiz
77f67d4c8f Improved the edge to edge mode in landscape mode.
* It was showing the content behind the display cutout in landscape mode.
* Removed the unnecessary code from BaseFragment.
* Enhanced the applying edge to edge mode for lower devices(Before Android 10).
2025-01-03 17:06:48 +01:00
MohitMaliFtechiz
e555e628bd Fixed: CoreReaderFragment's bottomBar going to up when closing the fullScreenMode in Android 8 and below. 2025-01-03 17:06:48 +01:00
MohitMaliFtechiz
6d983bd6b1 Fixed: The transparent color showing in the statusBar on Android 15 and above devices.
* Added proper comments on methods why we are doing this.
2025-01-03 17:06:48 +01:00
MohitMaliFtechiz
e6bdc0af0e Added backward compatibility for edgeToEdge mode to support all android versions.
* Removed the deprecated `FLAG_FULLSCREEN` from our project.
2025-01-03 17:06:48 +01:00
MohitMaliFtechiz
d94ca866df Improved the full screen mode since the systemBars were visible in fullScreen mode. 2025-01-03 17:06:48 +01:00
MohitMaliFtechiz
0c15a406f0 Fixed: All the screen which are overlapping with systemBars. 2025-01-03 17:06:48 +01:00
MohitMaliFtechiz
84807a1930 Fixed: ErrorActivity buttons overlapping in navigation buttons. 2025-01-03 17:06:48 +01:00