diff --git a/app/build.gradle b/app/build.gradle
index 9483a786..184bbea4 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -11,8 +11,8 @@ android {
compileSdkVersion 31
buildToolsVersion '29.0.2'
useLibrary 'org.apache.http.legacy'
- versionCode 127
- versionName "1.7.12"
+ versionCode 128
+ versionName "1.7.13"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
diff --git a/app/src/apkFlavor/AndroidManifest.xml b/app/src/apkFlavor/AndroidManifest.xml
index d46c0bb9..eb3d75a5 100644
--- a/app/src/apkFlavor/AndroidManifest.xml
+++ b/app/src/apkFlavor/AndroidManifest.xml
@@ -68,6 +68,7 @@
+
+
+
= 29)
+ addToArrayListUnique(Manifest.permission.SYSTEM_ALERT_WINDOW, requiredPermissions);
break;
case triggerUrl:
addToArrayListUnique(Manifest.permission.INTERNET, requiredPermissions);
@@ -890,6 +904,10 @@ public class ActivityPermissions extends Activity
for(String ruleName : getRulesUsing(Action.Action_Enum.startPhoneCall))
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
break;
+ case Manifest.permission.SYSTEM_ALERT_WINDOW:
+ for(String ruleName : getRulesUsing(Action.Action_Enum.startOtherActivity))
+ usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
+ break;
case Manifest.permission.ANSWER_PHONE_CALLS:
for(String ruleName : getRulesUsing(Action.Action_Enum.stopPhoneCall))
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
@@ -988,6 +1006,10 @@ public class ActivityPermissions extends Activity
if (requestCode == requestCodeForPermissionsBatteryOptimization)
if(havePermission(Manifest.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS, ActivityPermissions.this))
requestPermissions(cachedPermissionsToRequest, true);
+
+ if (requestCode == requestCodeForPermissionsManageOverlay)
+ if(havePermission(Manifest.permission.SYSTEM_ALERT_WINDOW, ActivityPermissions.this))
+ requestPermissions(cachedPermissionsToRequest, true);
}
}
@@ -1051,7 +1073,22 @@ 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.SYSTEM_ALERT_WINDOW))
+ {
+ AlertDialog diag = Miscellaneous.messageBox(getResources().getString(R.string.info), getResources().getString(R.string.overlayPermissionHint), ActivityPermissions.this);
+ diag.setOnDismissListener(new DialogInterface.OnDismissListener()
+ {
+ @Override
+ public void onDismiss(DialogInterface dialogInterface)
+ {
+ requiredPermissions.remove(s);
+ cachedPermissionsToRequest = requiredPermissions;
+ requestOverlay();
+ }
+ });
+ diag.show();
return;
}
else if (s.equalsIgnoreCase(Manifest.permission.BIND_NOTIFICATION_LISTENER_SERVICE))
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index cabb44d1..f46e109e 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -882,4 +882,6 @@
This permission is also required if the trigger is using the current wifi connection.
Copy text to clipboard
Text to copy
+ Draw over other apps
+ After clicking OK you\'ll be sent to a system dialog. Please select Automation there and allow "draw over other apps".
\ No newline at end of file
diff --git a/fastlane/metadata/android/en-US/changelogs/129.txt b/fastlane/metadata/android/en-US/changelogs/129.txt
new file mode 100644
index 00000000..ff079317
--- /dev/null
+++ b/fastlane/metadata/android/en-US/changelogs/129.txt
@@ -0,0 +1 @@
+* Introduced overlay permission to enable startActivity() from the background
\ No newline at end of file