280 Commits

Author SHA1 Message Date
MohitMaliFtechiz
ebbe1b9889 Fixed: Downloading was not working.
* Fixed: `Online Books` were showing incorrect book sizes. The OPDS stream now provides sizes in bytes instead of kilobytes, so the code has been updated accordingly.
* Added the `io.coil-kt.coil3:coil-compose` library to load favicons for online books, as OPDS now returns favicon URLs instead of Base64-encoded strings.
* Since favicons are no longer provided in Base64 format when downloading ZIM files, we now extract the favicon from the Archive using libkiwix after the download completes. This allows us to display it locally on various screens such as the library, Wi-Fi hotspot, notes, history, and more.
* Cached the `LibkiwixBook` instance to avoid recreating it multiple times when adding or removing bookmarks.
2025-06-05 23:49:02 +05:30
MohitMaliFtechiz
7a10528d19 Added the com.squareup.retrofit2:converter-scalars converter to Retrofit to parse OPDS network responses.
* Created `LibkiwixBook` to wrap the `Book` class from `libkiwix`, allowing us to set custom values from the database and manage books received from the `OPDS` stream. This wrapper is necessary because the original Book class does not provide setters. We'll use `LibkiwixBook` throughout the codebase.
* Refactored the codebase to replace `LibraryNetworkEntity.Book` with `LibkiwixBook`.
2025-06-04 22:16:09 +05:30
MohitMaliFtechiz
6cae44821e Refactored RxJava to coroutines in ConnectivityBroadcastReceiver.
* Simplified the `combineToLanguageList` method and removed warnings.
* Refactored `ZimManageViewModelTest` to align with the changes.
* Removed unused `RxJava` code from the project.
* Removed all `RxJava` dependencies from the project.
* Updated the `README` file to reflect that `RxJava` is no longer used.
* Updated `credit.html` accordingly, similar to the `README`.
2025-05-27 17:48:28 +05:30
MohitMaliFtechiz
4af14d8c98 Introduced the turbine library for efficiently testing the coroutine flows.
* Removed the `TestObserver` since it was sometimes stucks on the execution.
* Refactored the test cases according to turbine library.
2025-05-09 21:39:47 +05:30
MohitMaliFtechiz
5ee1fcdd2b Fixed all compilation errors in the project.
* Refactored `StartMultiSelection` to use coroutines instead of RxJava.
* Refactored `fileSelectActions` to use coroutines instead of RxJava.
* Refactored the `updateBookItems` to use coroutines instead of `rxJava`.
* Refactored `LocalLibraryFragment` to use coroutine flows instead of RxJava code.
* Improved the test code to validate coroutine flows.
* Refactored the `NewRecentSearchDaoTest` according to new flow test code.
* Refactored the `StorageObserverTest`.
* Refactored the `SearchViewModelTest`.
* Refactored the `FileSearchTest`.
2025-05-08 08:56:01 +05:30
MohitMaliFtechiz
33acbecb2d Remove the com.github.deano2390:MaterialShowcaseView library from project since now we have our own showcase view, and this library is only supports the XML based UI. 2025-04-19 17:37:47 +02:00
MohitMaliFtechiz
53e6cf3f92 Fixed: After upgrading Gradle, we were unable to upload the AAB because APK splitting was enabled.
* ABI splitting is now enabled only when needed (i.e., when building an APK) through an environment variable (APK_BUILD). By default, ABI splitting remains disabled.
* Refactored the workflow to align with this change.
* Updated the README to document this change, ensuring that everyone is aware of this feature.
2025-04-03 15:14:07 +05:30
MohitMaliFtechiz
01df6fe822 Fixed: The DownloadTest, and InitialDownloadTest sometimes failing on Android 16.
* Removed some unused code from project.
2025-03-31 17:29:00 +05:30
MohitMaliFtechiz
05e231579b Fixed: Compilation issues in unit test cases. The issue was in Gradle itself, which was preventing us from merging or excluding duplicate META-INF files.
* Upgraded Gradle to `8.11.0-alpha03` for better support for Android 16.
* Upgraded the Gradle wrapper to `8.13`, the latest version.
* Fixed: Some deprecated methods in the custom app's Gradle. The new methods for registering tasks are better than the previous ones, which is why Gradle deprecated the older methods.
* Refactored the `createDynamically` task for custom apps according to new gradle.
* Fixed: Some lint and detekt issues.
2025-03-31 15:27:31 +05:30
MohitMaliFtechiz
993c13f85e Fixed: Test cases were failing on the Android 16 emulator due to the stylus_handwriting_enabled setting being enabled by default, which displays a hint dialog when a text field takes focus. 2025-03-31 12:11:09 +05:30
MohitMaliFtechiz
16525b270f Upgraded gradle to 8.10.0-alpha08 to support Android 16 properly. 2025-03-31 12:11:09 +05:30
MohitMaliFtechiz
c669207c46 Fixed detekt and codefactore issues 2025-03-31 12:11:09 +05:30
MohitMaliFtechiz
f34d46cc7b Added target, compileSdkVersion versions since now there are sources available for SDK 36. 2025-03-31 12:11:09 +05:30
MohitMaliFtechiz
5d88048976 Upgraded the org.jetbrains.kotlinx:kotlinx-coroutines-rx3 to version 1.10.1.
* Upgraded the `androidx.test:orchestrator` to version `1.5.1`.
* Upgraded the `androidx.constraintlayout:constraintlayout` to version `2.2.0`.
* Fixed the last lint issue.
2025-03-31 12:11:09 +05:30
MohitMaliFtechiz
b1fa6ac998 Upgraded the com.googlecode.json-simple to version 1.1.1. * Upgraded the com.squareup.okhttp3:okhttp to version 4.12.0. * Fixed remaining deprecated object. 2025-03-31 12:11:09 +05:30
MohitMaliFtechiz
e472d11dc2 Refactored the java.util.Locale constructor, which is deprecated in Android 16. * Created to utilize the methods introduced in this Android version. * Upgraded AGP to , which supports Android 16. * Replaced targetSdkVersion and compileSdkVersion with targetSdkPreview and compileSdkPreview to add support for Android 16. * After upgrading the gradle lint showing some new errors so we have fixed those lint errors that required us to use the KTX extension functions, as they internally utilize the same functions we were using. 2025-03-31 12:11:09 +05:30
MohitMaliFtechiz
fbe7712b03 Added support for Android 16. * Upgraded the AGP to which supports Android 16.
* Replaced the  and  with , and  to add support for Android 16.
2025-03-31 12:11:09 +05:30
MohitMaliFtechiz
64db5ad3e5 Removed the unnecessary compose dependencies from project.
* Removed the unnecessary overriding of rows since we are not showing these rows in custom apps.
* Used `KiwixTheme` instead of hardcoded colors.
* Used the `KiwixAppBar` instead of manually created `AppBar`.
* Refined the `HelpScreen` for better readability and maintainability.
2025-03-28 13:02:20 +01:00
MohitMaliFtechiz
6aa0980e4d Fixed: Memory leak in CoreReaderFragment.
* Upgraded the leakCanary to `2.14`.
* Refactored the remaining test cases according to compose UI.
2025-03-24 15:55:38 +05:30
MohitMaliFtechiz
5ea7e86277 Refined the Compose dependencies.
* Refactored the dependencies to be included only in the modules where they are required.
* Removed unnecessary dependencies from the project.
2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
1743d7b231 Added ErrorActivity UI test case for testing the compose UI.
* Removed the unused code from project.
2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
55bcccce8c Migrating the ErrorActivity in jetpack.
* Added the jetpack compose libraries in project.
2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
c5cc0cdd4c Migrated the deprecated detekt rules to new rules.
* Refactored the code according to the new rules of detekt.
2025-03-07 22:57:34 +01:00
MohitMaliFtechiz
3725e929a5 Upgraded the detekt dependency to version 1.23.8. * Fixed: NoNameShadowing detekt issue 2025-02-24 14:52:14 +05:30
MohitMaliFtechiz
6721be1764 Upgraded detekt and ktlint libraries to latest version. 2025-02-21 19:05:43 +05:30
MohitMaliFtechiz
6946dceeda Upgraded the kiwix version to 3.14.0. 2025-01-28 09:01:14 +01:00
MohitMaliFtechiz
2746533375 Using java-libkiwix 2.2.4 to fix native crashes happens while getting the getEntryByPath, and getData() methods. 2025-01-28 11:41:21 +05:30
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
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
ce830093f9 Made the LAST_DATE const so that it can not be changed. 2025-01-04 10:02:29 +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
MohitMaliFtechiz
53d773846c Fixed the compilation error after rebasing to the main branch. 2025-01-03 17:06:48 +01:00
MohitMaliFtechiz
e35135fc91 Removed the excluding of dependency from fetch library as now our project has support for Android 15. 2025-01-03 17:06:48 +01:00
MohitMaliFtechiz
ccfc896f02 Enabled EdgeToEdge mode in project to support latest windowInset API. 2025-01-03 17:06:48 +01:00
MohitMaliFtechiz
db41f1d876 Upgraded the Gradle version to 8.7.2 which is required for Android 15.
* Upgraded the `kotlin_coroutines` dependency to `1.10.1`.
* Upgraded the `espresso` dependency to `3.6.1`.
* Upgraded the `tracing` dependency to `1.2.0`.
* Upgraded the `espresso` dependency to `3.6.1`.
* Upgraded the `material` dependency to `1.12.0`.
* Upgraded the `webkit` dependency to `1.12.1`.
* Upgraded the `room` dependency to `2.6.1`.
2025-01-03 17:06:48 +01:00
MohitMaliFtechiz
08c054586a Upgraded the dagger version to 2.53.1.
* Upgraded the ksp version to `2.0.0-1.0.24`.
* Upgraded the kotlin version to `2.0.0`.
* Upgraded the objectbox version to `4.0.3`.
* Removed the deprecated `runBlockingTest` from test cases which was giving compilation error because it is permanently removed in this version of kotlin.
* Replaced some deprecated methods with new methods that is deprecated in latest version of gradle.
* Fixed some string lint issues.
2025-01-03 17:06:48 +01:00
MohitMaliFtechiz
3423bbf671 Added support for Android 15. 2025-01-03 17:06:48 +01:00
MohitMaliFtechiz
2e63d70e6c Fixed: Downloading starts very slowly on Android 14+.
* Upgraded Fetch to 3.4.1.
* Upgraded Kotlin kotlin-stdlib from JDK7 to JDK8.
* Upgraded Kotlin version to 2.0.0 to support the latest Fetch library.
* Upgraded Dagger to 2.53.1.
* Upgraded ObjectBox to 4.0.3.
* Notification now shows "Pause" and "Resume" buttons instead of "pause" and "resume".
* Fixed: Notification buttons were not working on Android 13 and above.
* Fixed: Downloading was not working in the background. Added a foreground service for Fetch so that downloading will continue in the background.
2024-12-23 18:46:32 +05:30
MohitMaliFtechiz
2ddc395267 Added OkHttpDownloader in Fetch. 2024-12-19 21:49:50 +05:30
MohitMaliFtechiz
3ecb55928f Reintroduced the Fetch Library for Downloading ZIM files.
* Removed the DownloadManager from our project.
* Refactored the code, and test cases to use the Fetch library.
2024-12-19 17:04:22 +05:30
MohitMaliFtechiz
e3396901c6 Added Fetch library in our project for downloading the ZIM files. 2024-12-19 11:39:55 +05:30
MohitMaliFtechiz
bd2e299548 Upgraded the kiwix version to .3.13.0. 2024-12-18 11:46:29 +01:00
CalebK
9b64e5d815 Fixed failing test cases. 2024-12-10 17:15:47 +01:00
MohitMaliFtechiz
1904b91da0 Upgraded the kiwix version to 3.12.0 2024-11-21 12:23:49 +05:30
MohitMaliFtechiz
33bd3397e3 Fixed: Move canReadFile() method to IO thread.
* Moved the file readability check to the IO thread to prevent ANR.
* Refactored the code to accommodate this change.
2024-10-21 10:55:12 +05:30
MohitMaliFtechiz
0dc7224c2a Upgraded the java-libkiwix to 2.2.3 to start using the libkiwix14. 2024-10-15 09:48:11 +05:30
MohitMaliFtechiz
10837aef76 Refactored our code to properly show the downloading online library progress.
* Added a head request to get the library length and showing the progress on behalf of that length.
* Improved the library loading process: previously, fetching the online library involved making two requests, which not only took more time to get a response from the server but also used twice the bandwidth. To address this, we have refactored our code to ensure that only one request is made at a time.
* Upgraded the retrofit, and interceptor dependencies to latest version.
2024-09-18 15:24:08 +05:30
MohitMaliFtechiz
3ab0dcd8b9 Fixed: AndroidXTracer: java.lang.NoSuchMethodError: No static method forceEnableAppTracing error in UI test cases. 2024-09-13 18:42:37 +05:30
MohitMaliFtechiz
0278fa8a0c Added test cases to the CI for testing the minified version of the application to prevent this type of error from happening in the future. 2024-09-13 16:59:01 +05:30