As many developers on Stackoverflow, I have got the problem that when a user grants a system dangerous permission, I have got the "Screen overlay detected" alert.
I have seen many answers:
- some recommend to display an alert to open the phone settings so that the user can block the overlaying apps by himself (I don't like this, I don't want to ask something confusing to the user)
- some other recommend to delete the apps which induce an overlay (it is just a non sense as I cannot ask this to my users...)
- some others explain to take care to potential overlaying toasts from my own app (I don't perform any operation when the user accept the permission => not the cause of my problem)
So, what I want is to block PROGRAMMATICALLY any third party app which would like to overlay something on my app. I want everything to be invisible by the user.
Any possibility to do this ?
Thanks