mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
add a snackbar for displaying over other apps
This commit is contained in:
@ -12,11 +12,13 @@ import android.graphics.drawable.Icon
|
||||
import android.graphics.drawable.LayerDrawable
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.provider.Settings
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import androidx.appcompat.widget.SearchView
|
||||
import androidx.core.view.MenuItemCompat
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.helpers.*
|
||||
@ -51,6 +53,16 @@ class MainActivity : SimpleActivity() {
|
||||
|
||||
if (isDefaultDialer()) {
|
||||
checkContactPermissions()
|
||||
|
||||
if (!Settings.canDrawOverlays(this)) {
|
||||
val snackbar = Snackbar.make(main_holder, R.string.allow_displaying_over_other_apps, Snackbar.LENGTH_INDEFINITE).setAction(R.string.ok) {
|
||||
startActivity(Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION))
|
||||
}
|
||||
snackbar.setBackgroundTint(config.backgroundColor.darkenColor())
|
||||
snackbar.setTextColor(config.textColor)
|
||||
snackbar.setActionTextColor(config.textColor)
|
||||
snackbar.show()
|
||||
}
|
||||
} else {
|
||||
launchSetDefaultDialerIntent()
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/main_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
<string name="app_name">Simple Dialer</string>
|
||||
<string name="app_launcher_name">Marcador</string>
|
||||
<string name="default_phone_app_prompt">Fes que aquesta aplicació sigui l\'aplicació predeterminada de telèfon</string>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">No s\'ha pogut accedir als contactes</string>
|
||||
<!-- Recents -->
|
||||
|
@ -3,6 +3,7 @@
|
||||
<string name="app_name">Jednoduchý Telefon</string>
|
||||
<string name="app_launcher_name">Telefon</string>
|
||||
<string name="default_phone_app_prompt">Prosím nastavte tuto aplikace jako výchozí aplikaci k telefonování</string>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Nelze získat přístup k vašim kontaktům</string>
|
||||
<!-- Recents -->
|
||||
|
@ -2,6 +2,7 @@
|
||||
<string name="app_name">Simple Dialer</string>
|
||||
<string name="app_launcher_name">Opkald</string>
|
||||
<string name="default_phone_app_prompt">Vælg venligst denne app som standard til opkald</string>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Kunne ikke få adgang til dine kontakter</string>
|
||||
|
@ -3,6 +3,7 @@
|
||||
<string name="app_name">Schlichtes Telefon</string>
|
||||
<string name="app_launcher_name">Telefon</string>
|
||||
<string name="default_phone_app_prompt">Bitte machen Sie diese Anwendung zur Standard-Telefonanwendung</string>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">kein Zugriff auf Kontakte</string>
|
||||
<!-- Recents -->
|
||||
|
@ -2,6 +2,7 @@
|
||||
<string name="app_name">Απλή Κλήση</string>
|
||||
<string name="app_launcher_name">Κλήση</string>
|
||||
<string name="default_phone_app_prompt">Παρακαλώ κάντε αυτή την εφαρμογή προεπιλεγμένη εφαρμογή Κλήσης</string>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Αδυναμία πρόσβασης στις επαφές σας</string>
|
||||
|
@ -3,6 +3,7 @@
|
||||
<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>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Could not access your contacts</string>
|
||||
|
@ -2,6 +2,7 @@
|
||||
<string name="app_name">Marcador Simple</string>
|
||||
<string name="app_launcher_name">Marcador</string>
|
||||
<string name="default_phone_app_prompt">Hacer esta app la predeterminada para hacer llamadas en tu dispositivo</string>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">No se pudo acceder a tus contactos</string>
|
||||
|
@ -3,6 +3,7 @@
|
||||
<string name="app_name">Lihtne telefon</string>
|
||||
<string name="app_launcher_name">Telefon</string>
|
||||
<string name="default_phone_app_prompt">Palun muuda see rakendus helistamisel vaikimisi kasutatavaks rakenduseks</string>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Puudub ligipääs telefoniraamatule</string>
|
||||
<!-- Recents -->
|
||||
|
@ -3,6 +3,7 @@
|
||||
<string name="app_name">Simple Dialer</string>
|
||||
<string name="app_launcher_name">Puhelin</string>
|
||||
<string name="default_phone_app_prompt">Aseta tämä sovellus oletukseksi puheluille</string>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Ei käyttöoikeutta yhteystietoihin</string>
|
||||
<!-- Recents -->
|
||||
|
@ -3,6 +3,7 @@
|
||||
<string name="app_name">Simple Dialer</string>
|
||||
<string name="app_launcher_name">Téléphone</string>
|
||||
<string name="default_phone_app_prompt">Veuillez faire de cette application votre application de téléphone par défaut</string>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Impossible d\'accéder à vos contacts</string>
|
||||
<!-- Recents -->
|
||||
|
@ -2,6 +2,7 @@
|
||||
<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>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Non foi posible acceder aos contactos</string>
|
||||
|
@ -3,6 +3,7 @@
|
||||
<string name="app_name">Jednostavan birač</string>
|
||||
<string name="app_launcher_name">Birač</string>
|
||||
<string name="default_phone_app_prompt">Please make this app the default Phone app</string>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Nije moguće pristupiti vašim kontaktima</string>
|
||||
|
@ -3,6 +3,7 @@
|
||||
<string name="app_name">Egyszerű tárcsázó</string>
|
||||
<string name="app_launcher_name">Tárcsázó</string>
|
||||
<string name="default_phone_app_prompt">Tegye az alkalmazást az alapértelmezett Telefon alkalmazássá</string>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">A névjegyei nem érhetők el</string>
|
||||
<!-- Recents -->
|
||||
|
@ -2,6 +2,7 @@
|
||||
<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>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Tidak dapat mengakses kontak anda</string>
|
||||
|
@ -3,6 +3,7 @@
|
||||
<string name="app_name">Simple Dialer</string>
|
||||
<string name="app_launcher_name">Telefono</string>
|
||||
<string name="default_phone_app_prompt">Per favore, rendi l\'app la predefinita per le chiamate</string>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Impossibile accedere ai contatti</string>
|
||||
<!-- Recents -->
|
||||
|
@ -2,6 +2,7 @@
|
||||
<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>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">コンタクトにアクセスできませんでした</string>
|
||||
|
@ -3,6 +3,7 @@
|
||||
<string name="app_name">Paprastas rinkiklis</string>
|
||||
<string name="app_launcher_name">Telefonas</string>
|
||||
<string name="default_phone_app_prompt"></string>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Nepavyko gauti prieigos prie adresatų</string>
|
||||
<!-- Recents -->
|
||||
|
@ -2,6 +2,7 @@
|
||||
<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>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">നിങ്ങളുടെ കോൺടാക്റ്റുകൾ ആക്സസ് ചെയ്യാൻ കഴിഞ്ഞില്ല</string>
|
||||
|
@ -3,6 +3,7 @@
|
||||
<string name="app_name">Enkel oppringer</string>
|
||||
<string name="app_launcher_name">Oppringer</string>
|
||||
<string name="default_phone_app_prompt">Gjør denne appen til standard telefonapp</string>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Kunne ikke få tilgang til kontaktene dine</string>
|
||||
<!-- Recents -->
|
||||
|
@ -3,6 +3,7 @@
|
||||
<string name="app_name">Eenvoudige Telefoon</string>
|
||||
<string name="app_launcher_name">Telefoon</string>
|
||||
<string name="default_phone_app_prompt">Maak deze app de standaard Telefoon-app</string>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Kon geen toegang krijgen tot de contacten</string>
|
||||
<!-- Recents -->
|
||||
|
@ -3,6 +3,7 @@
|
||||
<string name="app_name">Prosty telefon</string>
|
||||
<string name="app_launcher_name">Telefon</string>
|
||||
<string name="default_phone_app_prompt">Ustaw tę aplikację jako domyślną aplikację telefonu</string>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Nie udało się uzyskać dostępu do Twoich kontaktów</string>
|
||||
<!-- Recents -->
|
||||
|
@ -3,6 +3,7 @@
|
||||
<string name="app_name">Discador Simples</string>
|
||||
<string name="app_launcher_name">Discador</string>
|
||||
<string name="default_phone_app_prompt">Por favor, torne este aplicativo o aplicativo de telefone padrão</string>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Não foi possível acessar seus contatos</string>
|
||||
<!-- Recents -->
|
||||
|
@ -3,6 +3,7 @@
|
||||
<string name="app_name">Simple Dialer</string>
|
||||
<string name="app_launcher_name">Marcador</string>
|
||||
<string name="default_phone_app_prompt">Tem que tornar esta a aplicação padrão para a poder utilizar</string>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Não foi possível aceder aos contactos</string>
|
||||
<!-- Recents -->
|
||||
|
@ -2,6 +2,7 @@
|
||||
<string name="app_name">Simple Dialer</string>
|
||||
<string name="app_launcher_name">Apeluri</string>
|
||||
<string name="default_phone_app_prompt">Vă rugăm să schimbaţi această aplicație să fie aplicația implicită pentru telefon</string>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Contactele dumneavoastră nu au putut fi accesate</string>
|
||||
|
@ -3,6 +3,7 @@
|
||||
<string name="app_name">Simple Dialer</string>
|
||||
<string name="app_launcher_name">Телефон</string>
|
||||
<string name="default_phone_app_prompt">Сделайте это приложение основным для совершения телефонных вызовов</string>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Невозможно получить доступ к контактам</string>
|
||||
<!-- Recents -->
|
||||
|
@ -1,7 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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>
|
||||
<string name="allow_displaying_over_other_apps">Pre spoľahlivé fungovanie prosím povoľte zobrazovanie nad ostatnými apkami</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Nepodarilo sa dostať ku kontaktom</string>
|
||||
|
@ -3,6 +3,7 @@
|
||||
<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>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Det gick inte att komma åt dina kontakter</string>
|
||||
<!-- Recents -->
|
||||
|
@ -3,6 +3,7 @@
|
||||
<string name="app_name">Basit Çevirici</string>
|
||||
<string name="app_launcher_name">Çevirici</string>
|
||||
<string name="default_phone_app_prompt">Lütfen bu uygulamayı varsayılan Telefon uygulaması yapın</string>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Kişilerinize erişilemedi</string>
|
||||
<!-- Recents -->
|
||||
|
@ -2,6 +2,7 @@
|
||||
<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>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Could not access your contacts</string>
|
||||
|
@ -3,6 +3,7 @@
|
||||
<string name="app_name">简易拨号器</string>
|
||||
<string name="app_launcher_name">拨号器</string>
|
||||
<string name="default_phone_app_prompt">请将此应用程序设置为默认的通话程序</string>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">无法访问您的通讯录</string>
|
||||
<!-- Recents -->
|
||||
|
@ -3,6 +3,7 @@
|
||||
<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>
|
||||
<string name="allow_displaying_over_other_apps">Please allow displaying over other apps for reliable behaviour</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="could_not_access_contacts">Could not access your contacts</string>
|
||||
|
Reference in New Issue
Block a user