- android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@a59d688 — permission denied for window type 2038 #6
- Comments
- piotrek-chmielowski commented Jan 19, 2018
- sockeqwe commented Jan 19, 2018
- javierdiaziut commented Jan 24, 2019
- 0xpulsar commented May 7, 2019
- 0xpulsar commented May 7, 2019
android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@a59d688 — permission denied for window type 2038 #6
Comments
piotrek-chmielowski commented Jan 19, 2018
In my Fragment I have the following code:
In the AndroidManifest.xml:
And I’m getting following error:
Android version: Oreo.
Am I doing something wrong or is it a bug?
The text was updated successfully, but these errors were encountered:
sockeqwe commented Jan 19, 2018
Since Android 7 you explicitly have to grant a permission «Draw over other apps» for apps not installed over play store (which is the case for debug builds, right?)
javierdiaziut commented Jan 24, 2019
I am facing the same problem, how did you solved it?
Caused by: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@7a40cfc — permission denied for window type 2038
at android.view.ViewRootImpl.setView(ViewRootImpl.java:817)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:356)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:93)
at android.app.Dialog.show(Dialog.java:330)
at com.app.health.daytoday_android.framework.NotificationService.launchDialog(NotificationService.kt:527)
at com.app.health.daytoday_android.framework.NotificationService.onStartCommand(NotificationService.kt:101)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3565)
at android.app.ActivityThread.-wrap21(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1742)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6626)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:811)
0xpulsar commented May 7, 2019
@javierdiaziut, even I am getting the same problem. Did you get the solution now?
0xpulsar commented May 7, 2019
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник