2733 Commits

Author SHA1 Message Date
Matthieu Gautier
708330c013 Fix crashing of server.
We have to keep the library alive to let the server working on it.
2023-08-11 16:02:56 +02:00
MohitMali
a1b5f36c59 Improved SearchFragmentTest:
After addressing the issue documented in https://github.com/kiwix/java-libkiwix/pull/61, we now have the ability to search within zim files that do not have a Xapian index. As a result, we have enhanced our test to utilize pre-existing zim files. This improvement leads to reduced time consumption, improved memory efficiency, and minimized network usage impact.
2023-08-08 18:11:05 +05:30
MohitMali
6235ba612a Keep everything in libkiwix/libzim in release variant.
* Updated proguard file to keep the `libkiwix/libzim` classes in release variant.
2023-08-07 17:33:37 +05:30
MohitMali
a99a988a98 Fixed ZimMangeViewModelTest 2023-08-07 17:29:46 +05:30
MohitMali
6655ad6c69 Refactored code to remove lint errors
* Now our minimum SDK version is 24 and we are using some conditions placed on behalf of this api level which are unused now, so we have removed those conditions.
* Removed `CompatV21` file as now it is unused.
* Renamed `CompatV23` to `CompatV24` and refactored the code to support our new minimum api level.
* Refactored `NetworkUtilsTest` to support api level 24.
2023-08-07 17:28:49 +05:30
MohitMali
0e6300f20c 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-07-27 18:08:27 +05:30
MohitMali
731b0a5843 Refactored SearchFragmentTest
* As we can not search in that zim file which is not contains the FT Xapian index and testzim.zim file is not contain it so we have improved our test case.
* Now we are downloading the `off the grid` zim file and performing the search functionality inside it.
2023-07-27 18:06:57 +05:30
MohitMali
824d40680f Fix the instrumentation test cases 2023-07-27 18:06:40 +05:30
MohitMali
f079a1ef88 Using newly published 'libkiwix 1.0.0' from maven 2023-07-27 18:06:33 +05:30
MohitMali
75adf8185a Refactored search functionality according to the new wrapper 2023-07-27 18:06:14 +05:30
MohitMaliFtechiz
7a6447c5da Removed the relinker dependency from the project, since now we are loading the .so files on the libkiwix side. Enabled the loadICUData method, since now it is fixed on the libkiwix side. Search and server is now starting successfully, but need some refactoring, for that see next commit. 2023-07-27 18:06:04 +05:30
MohitMali
02f2600270 Start using libkiwix 11.0.0 from maven, loading wrappers .so files for fixing the jni crash which we have missed loading in libkiwix 2023-07-27 18:05:48 +05:30
MohitMali
1476452085 Refactored the code to support the java-libkiwix 11.0.0 2023-07-27 18:05:05 +05:30
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
f8594b0183 Moved the common toolbar functionality to the BaseFragment 2023-07-18 22:41:12 +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
ded00766ba Fixes of KiwixWifiP2pBroadcastReceiver using some deprecated methods 2023-06-30 16:59:42 +02:00
MohitMaliFtechiz
36803af9e2 Fixed Toast.getView() and Html.fromHtml() is deprecated
* We already handled the deprecation of `fromHtml`, we have a string's extension function to handle the this so we are now using that function.
* Since `Toast.getView()` is no longer supported after Android 11 (it always returns null on Android 11 and above devices), we no longer need to show the toast on the ZIM file that is clicked by the user for UI enhancement. Therefore, we have removed this function and are now using the context class extension function to display the toast message.
2023-06-28 18:29:02 +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
17cbcf082d Refactor tab preview to use WebView instead of creating a bitmap
This commit introduces changes to the tab preview functionality in order to improve performance and memory usage. The previous approach of creating and storing bitmaps for tab previews has been replaced with a more efficient method utilizing WebView.

Changes Made:
- Modified the onBindViewHolder method in TabsAdapter to utilize WebView for tab previews.
- Removed the ImageUtils.kt class as it is no longer needed for bitmap storage.

Impact:
- Improved performance and reduced memory usage by directly displaying the WebView for tab previews.
- Eliminated the need for bitmap creation and storage, resulting in a more efficient implementation.
2023-06-27 17:22:10 +02:00
MohitMaliFtechiz
5256af49cd The item_progressbar.xml file has been renamed to item_custom_spinner.xml for better readability of the file 2023-06-23 07:02:17 +02:00
MohitMaliFtechiz
e081c856cd Fixes of ProgressDialog is deprecated 2023-06-23 07:02:17 +02:00
MohitMaliFtechiz
529bd1bde1 Refactored onBackPressed method with updated API
This commit introduces changes to refactor the usage of the deprecated `onBackPressed` method. The `onBackPressedDispatcher` API is now used instead.

Here's a summary of the changes made:
- Updated `AddNoteDialog.kt` and `NavigationHistoryDialog.kt` to handle the back button press on the navigation bar using the `onBackPressedDispatcher`.
- Modified `CoreMainActivity.kt` to handle all back button press operations in the application using the `onBackPressedDispatcher`.
- Updated `HelpFragment.kt` and `PageFragment.kt` to handle the back button press when the user clicks on the back arrow button in the toolbar.
- Refactored the `onBackPressed` method in `SaveLanguagesAndFinish.kt` to use the updated API, and updated the corresponding test cases accordingly.

These changes ensure that the `onBackPressed` functionality is updated to use the latest API, improving the readability and maintainability of the codebase.
2023-06-20 05:46:01 +02:00
MohitMaliFtechiz
7a5ff07180 Changed the requestPermission method of the fragment to utilize the new permission API registerForActivityResult.
* Updated the permission request for write storage permission, which is required for saving notes.
* Updated the permission request for read/write storage, necessary for scanning the file system in the LocalLibraryFragment.
* Fixed an issue where the permission layout would be displayed alongside the library list if the user swiped down to refresh.
* Suppress the deprecation warning for as `onRequestPermissionsResult` method is deprecated and we are using this for posting the result in all child fragments.
2023-06-20 01:38:45 +05:30
MohitMaliFtechiz
d8a323ddb1 Fixed ZimManageViewModelTest failure 2023-06-19 11:53:25 +05:30
MohitMaliFtechiz
9b1186d555 Refactored deprecated methods of ConnectivityManager class.
This commit refactors the deprecated methods of the ConnectivityManager class to ensure compatibility with different Android versions. The changes include:
* Introducing a new CompatV23 class to handle the deprecation of NetworkInfo and utilize the new NetworkCapabilities APIs available from Android 23 onwards.
* Retaining the existing methods for Android versions below 23 to maintain backward compatibility.
* Updating the test cases to cover both the new and old APIs.

These updates address the deprecation warnings and ensure that the code functions correctly on different Android versions.
2023-06-19 11:53:03 +05:30
MohitMaliFtechiz
9e79f11253 Refactored deprecated ConnectivityManager's method in NetworkUtils class 2023-06-19 11:35:36 +05:30
MohitMaliFtechiz
d68365b14f Fixed NotificationCompat.Builder(context) is deprecated 2023-06-16 21:42:48 +02:00
MohitMaliFtechiz
04dbbfd48e Removed deprecated requireFragmentManager() method 2023-06-16 13:48:19 +02:00
MohitMaliFtechiz
7bf7b2d5a7 Fixed local is deprecated 2023-06-14 13:50:12 +02:00
Shashank
a6d9251c1d minor fixes 2023-06-13 18:58:43 +05:30
Shashank
1163ad0a46 fixed-bottom-view-lost-issue 2023-06-13 18:58:43 +05:30
translatewiki.net
0b944184c7 Localisation updates from https://translatewiki.net. 2023-06-13 15:24:31 +02:00
MohitMaliFtechiz
f45816565e Fixed setting android:extractNativeLibs=false in manifest file is deprecated 2023-06-13 13:11:55 +02:00
MohitMaliFtechiz
cae2c2c5fe Fixed default constructor for Handler is deprecated 2023-06-13 13:10:55 +02:00
MohitMaliFtechiz
75f19cdfca Fixed observe extension method, which is deprecated in newer kotlin version 2023-06-13 01:56:30 +02:00
MohitMaliFtechiz
515f1e9230 Refactored setActivityForResult method for selecting SD card folder
We have used deprecated method for selecting folder for SD card in OnlineLibraryFragment.kt, CorePrefsFragment.kt, now we are using `registerForActivityResult` method instead of deprecated method in both places.
2023-06-12 18:08:20 +02:00
MohitMaliFtechiz
421cc7d22d Fixed deprecated startActivityForResult method in LocalLibraryFragment for selecting zim file from storage 2023-06-12 18:08:20 +02:00
MohitMaliFtechiz
b8dec4932e Fixed deprecated startActivityForResult method for enableLocationServices 2023-06-12 18:08:20 +02:00
MohitMaliFtechiz
554d6ac987 Fixed deprecated screenshot class 2023-06-08 15:47:13 +02:00
MohitMaliFtechiz
dc494f5bd3 Removed deprecated ActivityTestRule and InstrumentationRegistry from NetworkTest class 2023-06-08 12:59:04 +02:00
Emmanuel Engelhart
a2d4b1f55c
Bump-up version to 3.7.1 2023-06-05 21:55:16 +02:00
Gouri Panda
50d0941fc3 Set playstore track from alpha to internal 2023-06-02 13:13:27 +02:00
MohitMaliFtechiz
ff96685f56 Fixed fullscreen feature is broken in custom app 2023-05-31 18:42:37 +03:00
MohitMaliFtechiz
8b629b6b91 Fixed strict mode policy violation while deleting files in library screen 2023-05-26 17:23:24 +03:00
MohitMaliFtechiz
3d9bb3b47a Fixed strict mode violation while opening book from library screen 2023-05-26 17:23:24 +03:00
MohitMaliFtechiz
17c5d8a3d0 Fixed Strict mode policy on settings fragment 2023-05-26 17:23:24 +03:00
MohitMaliFtechiz
0a16f177a2 Fixed strict mode policy while changing tabs (Reader to Library, library to reader by clicking bottom navigation buttons) it also fixed the red effects while clicking on navigation items e.g bookmarks, history, notes, wifi hostspot, help 2023-05-26 17:23:24 +03:00
MohitMaliFtechiz
0ac73a9245 Fixed application crash on android 21
* FileObserver(File(path), Int) constructor is supported starting from Android 24. In versions prior to Android 24, this new constructor is not supported by the Android OS.
2023-05-26 17:20:11 +03:00