Android Question Screen Overlay Detected

BitsAndBytes

Active Member
Licensed User
I test one of my android apps on an android 6.0.1 device and it appears permission error
"Screen Overlay Detected"

What is this? Thank you!
 

DonManfred

Expert
Licensed User
Longtime User
you have a lib like Overlay included in your app? Using a window always on top (even on top of desktop) like the ChatHeads library for ex.
 
Upvote 0

JordiCP

Expert
Licensed User
Longtime User
Additionally, it seems to be a security measure of Android (6+) when a new app is requesting some permissions. Bringing the UI to manually grant some permissions is seen as potentially dangerous when there is an overlay, for obvious reasons.
Unfortunately, some apps do odd things when an overlay is actively running, especially if the app in question needs to request a new permission. Android absolutely will not allow permissions to be changed when an overlay is running, thus resulting in the “Screen Overlay Detected” error.
So the only thing is to 'localize' which app is using overlays and disable them when you need to run the new one.
 
Upvote 0
Top