376 Commits

Author SHA1 Message Date
MohitMali
d1c84e9555 Removed unnecessary file creation.
* Testing loading files from chunks.
* Removed the `PLAY_ASSET_FILE` file tag from BuildConfig file as now we are using chunks for loading zim file from asset folder.
2023-11-07 19:11:20 +05:30
MohitMali
54f8354104 Writing zim file in chunks with play asset delivery mode.
* We are reading the chunks and loading the data in ZimFileReader.
2023-11-07 18:35:30 +05:30
MohitMali
1b1d874c89 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-06 15:58:36 +05:30
MohitMali
ca4254b3e4 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-02 17:21:29 +05:30
MohitMali
a4f0132cda Using AssetFileDescriptor instead of ParcelFileDescriptor. 2023-11-01 11:08:48 +05:30
MohitMali
93cbf22bc1 Using ParcelFileDescriptor instead of FileDescriptor.
* Telling android to not compress the `.zim` files in asset folder while building the apk/bundle.
2023-11-01 11:08:33 +05:30
MohitMali
028b57e017 Introducing reading zim file content through fileDescriptor instead of creating a file to avoid using storage twice for same zim file. 2023-11-01 11:08:25 +05:30
MohitMali
0b59d9c586 Fixed, the DWDS app is very slow when opening a search result.
* Now, `libkiwix` provides the `pageUrl` along with the `pageTitle` (searchTitle). Previously, we were not using this `pageUrl` provided by `libkiwix`. Instead, we were making another request for the `pageUrl` based on the `pageTitle`, which was slowing down the process. We have now started directly using the `pageUrl` provided by `libkiwix` during the search. This change has made the process much more efficient and faster.
* To ensure the previously saved searches still work as expected, we have implemented a condition.
* We have added a new column in RecentSearchEntity for saving the `pageUrl` that we will use when user clicks on the recentSearchHistory.
2023-10-31 13:29:36 +01:00
translatewiki.net
bf089fdea0 Localisation updates from https://translatewiki.net. 2023-10-30 13:09:52 +01:00
Gouri Panda
a2f2bee81f Updated the asset folder naming 2023-10-21 13:15:59 +05:30
MohitMali
338d64efa7 Refactored the code to make the 'Play Asset Delivery' process generic.
* Renamed the module to 'install_time_asset' to make it generic for every custom app.
2023-10-20 16:16:34 +05:30
MohitMali
724f4a7ff4 Enhanced zim file loading functionality.
* We have corrected the order of obtaining ZIM files, specifically for the DWDS application. In this application, we retrieve the ZIM file from the asset folder, and there is no ZIM file inside the obb/files directory. This adjustment addresses an issue where a temporary file was mistakenly added to the files directory, causing the application to return an invalid file. By changing this order, it does not impact previous apps, as they do not have the ZIM file in the asset folder, allowing them to skip this part and function normally.
2023-10-20 14:41:35 +05:30
MohitMali
69ce81c175 Enhanced asset loading.
* Assets were always copied, even if they were already present in storage. This resulted in slow startup times, as the files were copied on each run. We now only write assets to a file when no file exists or corrupted.
2023-10-20 12:32:56 +05:30
Gouri Panda
e32ba6d70b Bundle order issue fixed 2023-10-20 02:03:51 +05:30
MohitMali
1d39d35d98 Added build task to sync the changes.
* In our 'publishingBundle' task, we are sequentially executing the 'downloading' and 'buildingBundle' tasks. Since we dynamically download and place the ZIM file, Gradle does not initially recognize any new files added to the asset folder. As a result, these files are not included in our bundle. Now, after downloading and placing the ZIM file in the asset folder, we synchronize our changes, allowing Gradle to detect the addition of new files.
2023-10-19 16:03:56 +05:30
MohitMali
725a5ccd0b Added overrided version code suffix 2023-10-17 15:36:10 +05:30
MohitMali
53d4ac1847 Fixed version code not found exception while publishing bundle on play store 2023-10-17 15:13:09 +05:30
MohitMali
1b87900695 Fixed zim file not found when we try to retrieve it from Play asset delivery to our application.
* We are now storing the zim file name in buildConfig file which we will use when we try to retrieve it later.
* Improved downloading functionality.
2023-10-17 12:28:42 +05:30
MohitMali
4c951de69e Fixed, Unable to upload APK on play store for new apps.
* We have implemented Play Asset Delivery to include the ZIM file within the Android App Bundle (AAB).
* To achieve this, we've created Gradle tasks to automatically download the ZIM file and place it inside the assets folder.
* In order to utilize this asset file, we've refactored our custom application code.
* We haven't removed the functionality of uploading the APK, as this approach remains static for now. Thus, we are retaining both codebases.
2023-10-17 11:07:45 +05:30
MohitMali
7460b9d6e5 Fixed, Code formatting issue 2023-10-16 12:58:59 +05:30
Gouri Panda
c4405ab6d1 Fixed language bundle issue for the playstore 2023-10-14 12:48:02 +02:00
Gouri Panda
12c6f5ec79 Reverting fixed language bundle issue for the playstore 2023-10-14 12:48:02 +02:00
Gouri Panda
033d11679e Fixed language bundle issue for the playstore 2023-10-14 12:48:02 +02:00
MohitMali
8c9cdcb6c6 Disabled the universal APK as now we are uploading the dummy bundle for custom apps instead of APK. 2023-10-14 12:48:02 +02:00
MohitMali
8f0d3fff2c We have enabled the universal APK for custom apps because we require this universal APK to create dummy APKs for the Play Store. 2023-10-14 12:48:02 +02:00
MohitMali
11c5b3caa2 Fixed URLConnection not adding headers to the request.
* In this update, we've replaced the `URLConnection` with the OkHttp library, and now headers are being correctly passed in the request. As a result, the Zim file is successfully downloading.
* To integrate OkHttp into our Gradle project, we've moved the OkHttp dependency to our `buildSrc` folder.
2023-10-14 12:48:02 +02:00
MohitMali
41be43d292 Fixed ZimHostFragment Open Issue for Both App and Custom Modules.
* We moved our server functionality to the core module to enable its use in both our app and custom modules. However, this change posed a challenge. We had a functionality that, when the user clicks on a notification, it takes them to the hosted book screen. By moving this functionality to the core module, we lost direct access to the navigation graph and `KiwixMainActivity` or `CustomMainActivity`.
* To address this issue, we introduced some abstract variables, such as navGraphId and mainActivity, which we set from both `KiwixMainActivity` and `CustomMainActivity`. This allows us to retrieve the navigation graph ID and the main activity.
* Additionally, we implemented a new function in `CoreApp` to set the currently running `CoreMainActivity`, which we use to obtain the navigation graph ID and main activity to perform the user click on notification.
2023-10-14 09:59:39 +02:00
MohitMali
94d592f545 Reintroduce wifi hotspot feature in custom apps.
* Moved wifi hotspot related files to core module to use hotspot functionality in both app and custom module.
* Moved permission in core manifest to access them in both modules.
* Removed some unnecessary files which is now no longer in use.
2023-10-14 09:59:39 +02:00
Gouri Panda
cdd4ce7fae Revert checking the authentication if works 2023-10-08 02:02:35 +05:30
Gouri Panda
0b4b223692 checking the authentication if works 2023-10-08 01:53:14 +05:30
Gouri Panda
852deaf57b changed order of chain request 2023-10-08 01:14:08 +05:30
Gouri Panda
717d593ad3 Fixed the bug that was happening in the ci 2023-10-07 20:05:50 +05:30
MohitMali
77f5146d64 Fixed CustomDownloadViewModelTest 2023-10-04 19:17:12 +02:00
MohitMali
e4624b238b Handled download on the first run when no ZIM file is found.
* We are showing a custom error message to the user for this type authentication urls because we does not have any authentication values in our application so it will always fail to download the zim file, so we are showing a error message where we inform to user to reinstall application from the playstore. Since play store application have the zim file in it.
2023-10-04 19:17:12 +02:00
MohitMali
f7517a2272 Minimum SDK version changed to 24: The NDK version in kiwix-build has been upgraded (as mentioned in https://github.com/kiwix/kiwix-build/issues/544). However, to make this upgrade compatible, the minimum SDK version had to be updated to 24 since the NDK version is not compatible with Android API levels below 24. The README.md file has been updated to reflect the new minimum Android support version, which is now Android 7, due to the change in the minimum SDK version. Since the project's minimum SDK version is now 24, some conditions related to Android 23 and 24 have become unused. These unused conditions have been removed, and along with that, the drawable-night-23 and drawable-23 launch_screen.xml files, which were no longer in use, have also been removed. 2023-09-18 19:13:20 +02:00
translatewiki.net
f29c206729 Localisation updates from https://translatewiki.net. 2023-09-18 13:08:06 +02:00
translatewiki.net
64a2bba45d Localisation updates from https://translatewiki.net. 2023-08-24 13:10:10 +02:00
MohitMali
6e195fc42f Fixed the UnsafeCallOnNullableType detekt issue in the project. 2023-07-18 22:42:54 +02:00
MohitMali
7493b842b7 Fixed UnnecessaryAbstractClass issue of detekt 2023-07-18 22:42:54 +02:00
MohitMali
f2d130c547 Fixes of Some deprecation warnings are showing in the logs but they are already fixed 2023-07-03 18:44:33 +05:30
MohitMaliFtechiz
aa86a88acb Fixed Auth.kt file using some deprecated method 2023-06-28 18:27:50 +02:00
MohitMaliFtechiz
c18c9d7bba Fixes for some Lint options have been deprecated in newer Gradle versions.
We have introduced a new method, configureCommonExtension, in the AllProjectConfigurer.kt file since Lint is only available in CommonExtension. This allows us to configure Lint in one place for every module. Previously, we couldn't directly use Lint in the android-library project, but with this approach, we can now configure Lint for the android-library project as well.
2023-06-27 17:22:59 +02:00
MohitMaliFtechiz
f45816565e Fixed setting android:extractNativeLibs=false in manifest file is deprecated 2023-06-13 13:11:55 +02:00
MohitMaliFtechiz
035d56d152 Removed storage permission and improved zim file scanning for custom apps
* Removes the requirement for storage permission at app startup for downloading zim files.
* Improved scanning of zim file for custom apps.
2023-06-05 15:26:37 +05:30
MohitMaliFtechiz
3c510b60f3 Fixed Invasive access photos and media permission request at start 2023-06-05 11:34:00 +05:30
MohitMaliFtechiz
093384d00f Upload apk on play store instead of uploading the app bundle 2023-05-25 17:18:18 +05:30
translatewiki.net
f542b2bf25 Localisation updates from https://translatewiki.net. 2023-05-19 14:28:42 +02:00
Gouri Panda
13865c67dc Removed universal apk 2023-05-19 17:29:32 +05:30
Gouri Panda
576327dc92 updated language split for each apk in the bundle 2023-05-19 13:17:21 +02:00
translatewiki.net
ba0d8dac65 Localisation updates from https://translatewiki.net. 2023-04-24 13:09:56 +02:00