question

John Cody avatar image
John Cody asked

Can't get SYSTEM_ALERT_WINDOW permission to work

I am adding the "android.permission.SYSTEM_ALERT_WINDOW" permission to my app's manifest.

But when I go to install the app on a Fire OS 7 device, it:

1) The installer does not list the "will display over other apps" permission warning before clicking "Install". The installer instead says "this app does not need any special permissions".

2) When my app then tries to open the overlay window, I get error "Unable to add window .... -- permission denied for window type 2003"

I'm thinking if I can fix issue #1 above, it will also fix #2.

So, why is the fire OS installer not seeing that my APK has the SYSTEM_ALERT_WINDOW permission? Since this is not a runtime permission, it should be granted to the app when it's installed, but for some reason the OS installer is not seeing that permission in my APK.

(Note: this is my first app for an amazon device, so do I need to do anything different with the APK than what I have been doing when I post an app to the google play store? for example, do I need to sign it differently?)

apipermissions
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

John Cody avatar image
John Cody answered

UPDATE: It looks like I am doing something wrong when I am creating the overlay window because the demo code for the overlay is working correctly.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.