mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-13 17:38:42 -04:00
Added a button to the startup message dialog to directly open the Kiwix website for downloading the APK. This will make it easier for the user who wants to download the full APK version of the Kiwix app.
This commit is contained in:
parent
c3a6a52255
commit
c20b40e389
@ -64,10 +64,12 @@ import org.kiwix.kiwixmobile.core.base.BaseFragment
|
||||
import org.kiwix.kiwixmobile.core.extensions.ActivityExtensions.isManageExternalStoragePermissionGranted
|
||||
import org.kiwix.kiwixmobile.core.extensions.ActivityExtensions.navigate
|
||||
import org.kiwix.kiwixmobile.core.extensions.ActivityExtensions.viewModel
|
||||
import org.kiwix.kiwixmobile.core.extensions.browserIntent
|
||||
import org.kiwix.kiwixmobile.core.extensions.coreMainActivity
|
||||
import org.kiwix.kiwixmobile.core.extensions.setBottomMarginToFragmentContainerView
|
||||
import org.kiwix.kiwixmobile.core.extensions.toast
|
||||
import org.kiwix.kiwixmobile.core.main.CoreMainActivity
|
||||
import org.kiwix.kiwixmobile.core.main.KIWIX_APK_WEBSITE_URL
|
||||
import org.kiwix.kiwixmobile.core.navigateToAppSettings
|
||||
import org.kiwix.kiwixmobile.core.navigateToSettings
|
||||
import org.kiwix.kiwixmobile.core.utils.LanguageUtils
|
||||
@ -380,7 +382,15 @@ class LocalLibraryFragment : BaseFragment() {
|
||||
// We should only ask for first time
|
||||
sharedPreferenceUtil.playStoreRestrictionPermissionDialog = false
|
||||
// Show Dialog to the user to inform about the play store restriction
|
||||
dialogShower.show(KiwixDialog.PlayStoreRestrictionPopup)
|
||||
dialogShower.show(
|
||||
KiwixDialog.PlayStoreRestrictionPopup,
|
||||
{},
|
||||
::openKiwixWebsiteForDownloadingApk
|
||||
)
|
||||
}
|
||||
|
||||
private fun openKiwixWebsiteForDownloadingApk() {
|
||||
requireActivity().startActivity(KIWIX_APK_WEBSITE_URL.toUri().browserIntent())
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
|
@ -55,6 +55,7 @@ import javax.inject.Inject
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
const val KIWIX_SUPPORT_URL = "https://www.kiwix.org/support"
|
||||
const val KIWIX_APK_WEBSITE_URL = "https://download.kiwix.org/release/kiwix-android/"
|
||||
const val PAGE_URL_KEY = "pageUrl"
|
||||
const val SHOULD_OPEN_IN_NEW_TAB = "shouldOpenInNewTab"
|
||||
const val FIND_IN_PAGE_SEARCH_STRING = "findInPageSearchString"
|
||||
|
@ -174,7 +174,7 @@ sealed class KiwixDialog(
|
||||
null,
|
||||
R.string.zim_files_not_showing_description,
|
||||
R.string.understood,
|
||||
null
|
||||
R.string.download
|
||||
)
|
||||
|
||||
data class ShowRate(override val args: List<Any>, val customIcon: Int?) :
|
||||
|
Loading…
x
Reference in New Issue
Block a user