I am trying to write a simple app for Fire OS 7 (Android 9) and it requires the overpay permission (SYSTEM_ALERT_WINDOW).
When I go to install the B4A generated APK (using the below manifest code), the fire os installer says "no special permissions are requested from this app":
But when I install another company's APK that also requests the overlay permission, the fire os properly displays "this app will draw over other apps" permission *before* it installs the APK, so obviously it is reading the APK's manifest which is:
So what is different about the B4A generated APK that causes fire os to not see that it requires the overlay permission?
I am asking because even if I try to use Erel's code (at https://www.b4x.com/android/forum/threads/draw-on-top-of-other-apps-permission.90513/), I am getting a "onActivityResult: wi is null" error. So I want to fix this first issue (of the installer not recognizing the overlay permission) first, then see if the "onActivityResult: wi is null" error goes away because that other company's app doesn't pop-up a permission settings dialog when it's run in order to display the overlay - it just displays the overlay - so maybe with fire os it doesn't need to display a settings dialog to do overlays and just the permission in the manifest is needed to do overlays.
When I go to install the B4A generated APK (using the below manifest code), the fire os installer says "no special permissions are requested from this app":
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="26"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
AddPermission(android.permission.SYSTEM_ALERT_WINDOW
But when I install another company's APK that also requests the overlay permission, the fire os properly displays "this app will draw over other apps" permission *before* it installs the APK, so obviously it is reading the APK's manifest which is:
B4X:
<?xml version="1.0" encoding="UTF-8"?>
-<manifest platformBuildVersionName="9" platformBuildVersionCode="28" package="com.xxx.xx" android:installLocation="preferExternal" android:compileSdkVersionCodename="9" android:compileSdkVersion="28" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-feature android:required="false" android:name="android.hardware.touchscreen"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES"/>
So what is different about the B4A generated APK that causes fire os to not see that it requires the overlay permission?
I am asking because even if I try to use Erel's code (at https://www.b4x.com/android/forum/threads/draw-on-top-of-other-apps-permission.90513/), I am getting a "onActivityResult: wi is null" error. So I want to fix this first issue (of the installer not recognizing the overlay permission) first, then see if the "onActivityResult: wi is null" error goes away because that other company's app doesn't pop-up a permission settings dialog when it's run in order to display the overlay - it just displays the overlay - so maybe with fire os it doesn't need to display a settings dialog to do overlays and just the permission in the manifest is needed to do overlays.
Last edited: