diff --git a/app/src/main/java/org/kiwix/kiwixmobile/nav/destination/library/LocalLibraryFragment.kt b/app/src/main/java/org/kiwix/kiwixmobile/nav/destination/library/LocalLibraryFragment.kt index ea200e5e8..51d8875dc 100644 --- a/app/src/main/java/org/kiwix/kiwixmobile/nav/destination/library/LocalLibraryFragment.kt +++ b/app/src/main/java/org/kiwix/kiwixmobile/nav/destination/library/LocalLibraryFragment.kt @@ -44,7 +44,6 @@ import androidx.appcompat.widget.Toolbar import androidx.coordinatorlayout.widget.CoordinatorLayout import androidx.core.app.ActivityCompat import androidx.core.content.ContextCompat -import androidx.core.content.FileProvider import androidx.core.net.toUri import androidx.core.view.MenuHost import androidx.core.view.MenuProvider @@ -709,28 +708,6 @@ class LocalLibraryFragment : BaseFragment(), CopyMoveFileHandler.FileCopyMoveCal } private fun showWarningDialogForSplittedZimFile() { - dialogShower.show( - KiwixDialog.ShowWarningAboutSplittedZimFile, - ::openCopiedMovedDirectory - ) - } - - private fun openCopiedMovedDirectory() { - val downloadedDirectoryPath = FileProvider.getUriForFile( - requireActivity(), - requireActivity().applicationContext.packageName + ".fileprovider", - File(sharedPreferenceUtil.prefStorage) - ) - val intent = Intent(Intent.ACTION_VIEW).apply { - setDataAndType(downloadedDirectoryPath, "*/*") - addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION) - addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) - } - try { - requireActivity().startActivity(intent) - } catch (ignore: Exception) { - // TODO change the message - activity.toast(org.kiwix.kiwixmobile.core.R.string.no_reader_application_installed) - } + dialogShower.show(KiwixDialog.ShowWarningAboutSplittedZimFile) } } diff --git a/core/src/main/java/org/kiwix/kiwixmobile/core/utils/dialog/KiwixDialog.kt b/core/src/main/java/org/kiwix/kiwixmobile/core/utils/dialog/KiwixDialog.kt index 17b3c1eec..39201be07 100644 --- a/core/src/main/java/org/kiwix/kiwixmobile/core/utils/dialog/KiwixDialog.kt +++ b/core/src/main/java/org/kiwix/kiwixmobile/core/utils/dialog/KiwixDialog.kt @@ -121,8 +121,8 @@ sealed class KiwixDialog( data object ShowWarningAboutSplittedZimFile : KiwixDialog( R.string.verify_zim_chunk_dialog_title, R.string.verify_zim_chunks_dialog_message, - R.string.view, android.R.string.ok, + null, cancelable = false ) diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml index 44de264ae..995cc2e12 100644 --- a/core/src/main/res/values/strings.xml +++ b/core/src/main/res/values/strings.xml @@ -335,8 +335,7 @@ Kiwix requires the ZIM file to be in its own data directory. Do you want to copy or move it there? Error in copying the ZIM file: %s. Be cautious: Ensure all ZIM chunks have been properly moved/copied! - You can verify them by clicking the “View” button. Once done, refresh the library screen by swiping down. The split ZIM file will then appear in your library. - View + You can verify them inside “Android/media/org.kiwix…/” folder.\nOnce done, refresh the library screen by swiping down. The split ZIM file will then appear in your library. Why copy/move files to app public directory? Due to Google Play policies on Android 11 and above, our app can no longer directly access files stored elsewhere on your device. To let you view your selected files, we need to move or copy them into a special folder within our application directory. This allows us to access and open the files. Choose storage to copy/move ZIM file