use Intent.CATEGORY_APP_MAIN instead of hardcoded reference to play store

This commit is contained in:
Josia Pietsch 2024-08-05 15:46:55 +02:00
parent 0553d5eb4c
commit c6fe8dc405
Signed by: jrpie
GPG key ID: E70B571D66986A2D
5 changed files with 8 additions and 11 deletions

View file

@ -68,15 +68,12 @@ SettingsFragmentActions : Fragment(), UIObject {
} }
binding!!.settingsActionsButtonInstallApps.setOnClickListener{ binding!!.settingsActionsButtonInstallApps.setOnClickListener{
try { try {
val rateIntent = Intent( val intent = Intent(Intent.ACTION_MAIN)
Intent.ACTION_VIEW, intent.addCategory(Intent.CATEGORY_APP_MARKET)
Uri.parse("https://play.google.com/store/apps/"))
intendedSettingsPause = true intendedSettingsPause = true
startActivity(rateIntent) startActivity(intent)
} catch (e: ActivityNotFoundException) { } catch (e: ActivityNotFoundException) {
Toast.makeText(this.context, getString(R.string.settings_apps_toast_store_not_found), Toast.LENGTH_SHORT) Toast.makeText(context, getString(R.string.settings_apps_toast_store_not_found), Toast.LENGTH_SHORT).show()
.show()
} }
} }
} }

View file

@ -45,7 +45,7 @@
<string name="settings_apps_view_all">Alle Anwendungen</string> <string name="settings_apps_view_all">Alle Anwendungen</string>
<string name="settings_apps_install">Apps installieren</string> <string name="settings_apps_install">Apps installieren</string>
<string name="settings_apps_toast_store_not_found">PlayStore nicht gefunden</string> <string name="settings_apps_toast_store_not_found">Store nicht gefunden</string>
<!-- <!--
- -

View file

@ -55,7 +55,7 @@
<string name="settings_apps_view_all">Todas las aplicaciones</string> <string name="settings_apps_view_all">Todas las aplicaciones</string>
<string name="settings_apps_install">Instalar aplicaciones</string> <string name="settings_apps_install">Instalar aplicaciones</string>
<string name="settings_apps_toast_store_not_found">No se encontró la PlayStore</string> <string name="settings_apps_toast_store_not_found">No se encontró la Store</string>
<!-- <!--
- -

View file

@ -45,7 +45,7 @@
<string name="settings_apps_view_all">Toutes les applications</string> <string name="settings_apps_view_all">Toutes les applications</string>
<string name="settings_apps_install">Installer applications</string> <string name="settings_apps_install">Installer applications</string>
<string name="settings_apps_toast_store_not_found">Pas trouvé le PlayStore</string> <string name="settings_apps_toast_store_not_found">Pas trouvé le Store</string>
<!-- <!--
- -

View file

@ -61,7 +61,7 @@
<string name="settings_apps_view_all">View all apps</string> <string name="settings_apps_view_all">View all apps</string>
<string name="settings_apps_install">Install apps</string> <string name="settings_apps_install">Install apps</string>
<string name="settings_apps_toast_store_not_found">PlayStore not found</string> <string name="settings_apps_toast_store_not_found">Store not found</string>
<!-- <!--
- -