mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
show a prompt with redirection if a phone call cannot be made
This commit is contained in:
@ -4,8 +4,10 @@ import android.annotation.SuppressLint
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.provider.Settings
|
||||
import android.telecom.TelecomManager
|
||||
import android.view.Menu
|
||||
import android.widget.Toast
|
||||
import com.simplemobiletools.commons.extensions.isDefaultDialer
|
||||
import com.simplemobiletools.commons.extensions.showErrorToast
|
||||
import com.simplemobiletools.commons.extensions.telecomManager
|
||||
@ -64,6 +66,14 @@ class DialerActivity : SimpleActivity() {
|
||||
super.onActivityResult(requestCode, resultCode, resultData)
|
||||
if (requestCode == REQUEST_CODE_SET_DEFAULT_DIALER) {
|
||||
if (!isDefaultDialer()) {
|
||||
try {
|
||||
Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS).apply {
|
||||
data = Uri.parse("package:$packageName")
|
||||
startActivity(this)
|
||||
}
|
||||
toast(R.string.default_phone_app_prompt, Toast.LENGTH_LONG)
|
||||
} catch (ignored: Exception) {
|
||||
}
|
||||
finish()
|
||||
} else {
|
||||
initOutgoingCall()
|
||||
|
@ -1,6 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">Simple Dialer</string>
|
||||
<string name="app_launcher_name">Dialer</string>
|
||||
<string name="default_phone_app_prompt">Please make this app the default Phone app</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Nejde získat přístup k vašim kontaktům</string>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">Schlichtes Telefon</string>
|
||||
<string name="app_launcher_name">Telefon</string>
|
||||
<string name="default_phone_app_prompt">Please make this app the default Phone app</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">kein Zugriff auf Kontakte</string>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">Απλή Κλήση</string>
|
||||
<string name="app_launcher_name">Κλήση</string>
|
||||
<string name="default_phone_app_prompt">Please make this app the default Phone app</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Αδυναμία πρόσβασης στις επαφές σας</string>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">Marcador Simple</string>
|
||||
<string name="app_launcher_name">Marcador</string>
|
||||
<string name="default_phone_app_prompt">Please make this app the default Phone app</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">No se pudo acceder a tus contactos</string>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">Simple Dialer</string>
|
||||
<string name="app_launcher_name">Puhelin</string>
|
||||
<string name="default_phone_app_prompt">Please make this app the default Phone app</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Ei käyttöoikeutta yhteystietoihin</string>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">Simple Dialer</string>
|
||||
<string name="app_launcher_name">Téléphone</string>
|
||||
<string name="default_phone_app_prompt">Please make this app the default Phone app</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Impossible d\'accéder à vos contacts</string>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">Simple Dialer</string>
|
||||
<string name="app_launcher_name">Marcador</string>
|
||||
<string name="default_phone_app_prompt">Please make this app the default Phone app</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Non foi posible acceder aos contactos</string>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">Simple Dialer</string>
|
||||
<string name="app_launcher_name">Dialer</string>
|
||||
<string name="default_phone_app_prompt">Please make this app the default Phone app</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Tidak dapat mengakses kontak anda</string>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">Simple Dialer</string>
|
||||
<string name="app_launcher_name">Telefono</string>
|
||||
<string name="default_phone_app_prompt">Please make this app the default Phone app</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Impossibile accedere ai contatti</string>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">Simpleダイヤラー</string>
|
||||
<string name="app_launcher_name">ダイヤラー</string>
|
||||
<string name="default_phone_app_prompt">Please make this app the default Phone app</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">コンタクトにアクセスできませんでした</string>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">Simple Dialer</string>
|
||||
<string name="app_launcher_name">ഡയലർ</string>
|
||||
<string name="default_phone_app_prompt">Please make this app the default Phone app</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">നിങ്ങളുടെ കോൺടാക്റ്റുകൾ ആക്സസ് ചെയ്യാൻ കഴിഞ്ഞില്ല</string>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">Eenvoudige Telefoon</string>
|
||||
<string name="app_launcher_name">Telefoon</string>
|
||||
<string name="default_phone_app_prompt">Please make this app the default Phone app</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Kon geen toegang krijgen tot de contacten</string>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">Prosty telefon</string>
|
||||
<string name="app_launcher_name">Telefon</string>
|
||||
<string name="default_phone_app_prompt">Please make this app the default Phone app</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Nie można uzyskać dostępu do Twoich kontaktów</string>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">Simple Dialer</string>
|
||||
<string name="app_launcher_name">Marcador</string>
|
||||
<string name="default_phone_app_prompt">Please make this app the default Phone app</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Não foi possível aceder aos contactos</string>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">Simple Dialer</string>
|
||||
<string name="app_launcher_name">Телефон</string>
|
||||
<string name="default_phone_app_prompt">Please make this app the default Phone app</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Невозможно получить доступ к контактам</string>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">Jednoduchý telefón</string>
|
||||
<string name="app_launcher_name">Telefón</string>
|
||||
<string name="default_phone_app_prompt">Prosím nastavte apku ako predvolenú na správu hovorov</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Nepodarilo sa dostať ku kontaktom</string>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">Simple Dialer</string>
|
||||
<string name="app_launcher_name">Telefon</string>
|
||||
<string name="default_phone_app_prompt">Please make this app the default Phone app</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Det gick inte att komma åt dina kontakter</string>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">Basit Çevirici</string>
|
||||
<string name="app_launcher_name">Çevirici</string>
|
||||
<string name="default_phone_app_prompt">Please make this app the default Phone app</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Kişilerinize erişilemedi</string>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">Simple Dialer</string>
|
||||
<string name="app_launcher_name">Dialer</string>
|
||||
<string name="default_phone_app_prompt">Please make this app the default Phone app</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Could not access your contacts</string>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">简易拨号器</string>
|
||||
<string name="app_launcher_name">拨号器</string>
|
||||
<string name="default_phone_app_prompt">Please make this app the default Phone app</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">无法访问您的通讯录</string>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">Simple Dialer</string>
|
||||
<string name="app_launcher_name">Dialer</string>
|
||||
<string name="default_phone_app_prompt">Please make this app the default Phone app</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Could not access your contacts</string>
|
||||
|
Reference in New Issue
Block a user