* Previously we can only open zim files from `USB-OTG` in android 10 and below devices, because `context.getExternalFilesDirs("")` does not provide the USB path in android 10 and above devices for security reasons. There is no direct way to access the USB-OTG on these devices, but USB-OTG are mounted under the `/mnt/media_rw` directory, so now we are directly using this to open zim files from USB drive for android 10 and above devices.
* Added `tmpfs` filesystem to `support 4GB filesystem list` since this type supports writing files over 4GB.
* Updated the name of the writing test result file to `kiwix_4gb_writing_test_result` to enhance readability.
* When any article is loading then we invalidate the `OptionMenu` from `KiwixWebChromeClient` (It does not check whether the fragment is visible or not) which also invalidates the toolbar and the search bar is inside the toolbar that's the reason the keyboard showing and hiding repeatedly.
* Now we are invalidating the `OptionMenu` inside the `CoreReaderFragment` when it is visible to the user since this fragment loads the content in the webview. Hence, it is better to update the UI when it is visible to the user so it would not affect any other UI part.
* Added pause/resume button beside the stop button to perform pause/resume action on the downloading zim file.
* Handling pause/resume via fetch library.
* 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.
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.
We have removed the usage of deprecated flags FLAG_FULLSCREEN and FLAG_FORCE_NOT_FULLSCREEN. Instead, we are now using the updated API `WindowCompat.setDecorFitsSystemWindows` to handle fullscreen mode. This API automatically takes care of handling fullscreen behavior for both older and newer API levels.
Now, during the screen launch, we only set up the TTS service with the WebView. This is necessary to configure the JavaScript interface when the WebView is created. Otherwise, the JavaScript interface is not recognized. We initialize the TTS feature when the user tries to use it for better optimization.