It completely ignores:
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
So I got exception:
Caused by: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@86fb55b -- permission denied for this window type
It's not even listed:
How should I fix it? Thanks.
EDIT:
It's listed in Configure apps/ Advanced / Draw over other app. So i turn it on and now it works fine, but why there isn't any dialog to ask about permission when i run my app? All perrmissions was turned off by deafult and i need to go to settings and mannualy turn it on?
Activity#requestPermissions()
, but this doesn't work. – Iyar