diff --git a/app/src/main/java/com/jens/automation2/ActivityPermissions.java b/app/src/main/java/com/jens/automation2/ActivityPermissions.java
index 516b9aeb..e546d49e 100644
--- a/app/src/main/java/com/jens/automation2/ActivityPermissions.java
+++ b/app/src/main/java/com/jens/automation2/ActivityPermissions.java
@@ -47,6 +47,7 @@ public class ActivityPermissions extends Activity
private static final int requestCodeForPermissionsNotifications = 12046;
private static final int requestCodeForPermissionsDeviceAdmin = 12047;
private static final int requestCodeForPermissionsBatteryOptimization = 12048;
+ private static final int requestCodeForPermissionNotificationAccessAndroid13 = 12049;
protected String[] specificPermissionsToRequest = null;
public static String intentExtraName = "permissionsToBeRequested";
@@ -1046,14 +1047,33 @@ public class ActivityPermissions extends Activity
cachedPermissionsToRequest = requiredPermissions;
Intent intent = new Intent(android.provider.Settings.ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS);
startActivityForResult(intent, requestCodeForPermissionsNotificationPolicy);
+
return;
}
else if (s.equalsIgnoreCase(Manifest.permission.BIND_NOTIFICATION_LISTENER_SERVICE))
{
- requiredPermissions.remove(s);
- cachedPermissionsToRequest = requiredPermissions;
- Intent intent = new Intent(Settings.ACTION_NOTIFICATION_LISTENER_SETTINGS);
- startActivityForResult(intent, requestCodeForPermissionsNotifications);
+ if(Build.VERSION.SDK_INT >= 33)
+ {
+ AlertDialog dialog = Miscellaneous.messageBox(getResources().getString(R.string.info), getResources().getString(R.string.notificationAccessAndroid13), ActivityPermissions.this);
+ dialog.setOnDismissListener(new DialogInterface.OnDismissListener()
+ {
+ @Override
+ public void onDismiss(DialogInterface dialogInterface)
+ {
+ requiredPermissions.remove(s);
+ cachedPermissionsToRequest = requiredPermissions;
+ requestNotificationAccess();
+ }
+ });
+ dialog.show();
+ }
+ else
+ {
+ requiredPermissions.remove(s);
+ cachedPermissionsToRequest = requiredPermissions;
+ requestNotificationAccess();
+ }
+
return;
}
else if(s.equals(Manifest.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS))
@@ -1128,6 +1148,12 @@ public class ActivityPermissions extends Activity
}
}
+ void requestNotificationAccess()
+ {
+ Intent intent = new Intent(Settings.ACTION_NOTIFICATION_LISTENER_SETTINGS);
+ startActivityForResult(intent, requestCodeForPermissionsNotifications);
+ }
+
protected void applyChanges()
{
AutomationService service = AutomationService.getInstance();
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 4e92e388..a8647974 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -779,4 +779,5 @@
via startService()
Toasts anzeigen
Popups anzeigen, wenn Ereignisse wie Regelausführungen auftreten
+ Nachdem Sie auf OK geklickt haben, wählen Sie Automatisierung, dann \"Benachrichtigungszugriff zulassen\" und dann \"Zulassen\".
\ No newline at end of file
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index 22a7c0b5..4caccedd 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -778,4 +778,5 @@
via startService()
Mostrar toasts
Mostrar notificaciones del sistema cuando se producen eventos como ejecuciones de reglas
+ Después de hacer clcliquear en OK, seleccione Automation, luego seleccione \"Permitir acceso a notificaciones\", luego \"Permitir\".
\ No newline at end of file
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index a873dabb..a2ca330e 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -778,4 +778,5 @@
via startService()
Afficher les toasts
Afficher les toasts lorsque des événements tels que des exécutions de règles se produisent
+ Après avoir cliqué sur OK, sélectionnez Automatisation, puis sélectionnez « Autoriser l\'accès aux notifications », puis « Autoriser ».
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index 0a349037..0cb7d36c 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -779,4 +779,5 @@
tramite startService()
Mostra toast
Mostrare gli avvisi popup quando si verificano eventi come le esecuzioni di regole
+ Dopo aver fatto clic su OK, selezionare Automazione, quindi selezionare \"Consenti accesso alle notifiche\", quindi \"Consenti\".
diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml
index a464474c..e8fac35d 100644
--- a/app/src/main/res/values-nl/strings.xml
+++ b/app/src/main/res/values-nl/strings.xml
@@ -777,5 +777,6 @@
via startService()
Toon toasts
Pop-ups weergeven wanneer gebeurtenissen zoals regeluitvoeringen plaatsvinden
+ Nadat u op OK hebt geklikt, selecteert u Automatisering, selecteert u vervolgens \"Toegang tot meldingen toestaan\" en vervolgens \"toestaan\".
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index 8c6d28eb..13084154 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -836,4 +836,5 @@
дорога startService()
Показать тосты
Отображение всплывающих уведомлений при таких событиях, как выполнение правил
+ После нажатия кнопки «ОК» выберите «Автоматизация», затем выберите «Разрешить доступ к уведомлениям», затем «Разрешить».
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 893994ce..ab0e9db4 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -876,4 +876,5 @@
by startService()
Show toasts
Show toasts when events like rule executions occur
+ After clicking ok, select Automation, then select \"Allow notification access\", then \"allow\".
\ No newline at end of file