Is there any way to detect whether there are any other apps drawing over your app (such as a screen filter) while your app is open programmatically? I want to be able to detect them so I can inform the user to turn them off in my app.
The one thing I thought of doing was using something similar to this solution https://stackoverflow.com/a/27140347/6854141 which uses the ActivityManager
methods to detect the current foreground app/service and see if it isn't my application's package or potentially look for certain packages that I know would cause this issue.
However, this method involves various accommodations for pre Lollipop, Lollipop, Android M, and currently does not work for Android N--it's essential that the solution I implement works for Android N. I'm also not sure where something like a screen filter would fall in terms of importance status.