App is crashing - permission denied on window type 2006 error
ShrutiSantosh opened this issue · 15 comments
App is crashing with permission denied on window type 2006 error , on Initializing bubble on android p version devices, even though I added permission in manifest as well as java class.
Same issue!
same issue
Same issue
07-17 15:20:33.399 28742 28742 E AndroidRuntime: FATAL EXCEPTION: main
07-17 15:20:33.399 28742 28742 E AndroidRuntime: Process: ******* PID: 28742
07-17 15:20:33.399 28742 28742 E AndroidRuntime: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@83f9942 -- permission denied for window type 2006
07-17 15:20:33.399 28742 28742 E AndroidRuntime: at android.view.ViewRootImpl.setView(ViewRootImpl.java:958)
07-17 15:20:33.399 28742 28742 E AndroidRuntime: at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:398)
07-17 15:20:33.399 28742 28742 E AndroidRuntime: at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:131)
07-17 15:20:33.399 28742 28742 E AndroidRuntime: at com.txusballesteros.bubbles.h.run(Unknown Source:12)
07-17 15:20:33.399 28742 28742 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:907)
07-17 15:20:33.399 28742 28742 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:105)
07-17 15:20:33.399 28742 28742 E AndroidRuntime: at android.os.Looper.loop(Looper.java:216)
07-17 15:20:33.399 28742 28742 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7593)
07-17 15:20:33.399 28742 28742 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
07-17 15:20:33.399 28742 28742 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
07-17 15:20:33.399 28742 28742 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
07-17 15:20:33.400 28742 28742 E e.g.a.d : FATAL EXCEPTION: mainandroid.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@83f9942 -- permission denied for window type 2006
Same here!
same issue
Try
if (!Settings.canDrawOverlays(this)) { Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION, Uri.parse("package:" + getPackageName())); startActivityForResult(intent, 5054); }else { bubblesManager.addBubble(bubbleView, 60, 20); }
i have been working on this issue and i fixed it please go a head to my modification and clone it
https://github.com/abdelrahmana/bubble-Android-
cheers
i have been working on this issue and i fixed it please go a head to my modification and clone it
https://github.com/abdelrahmana/bubble-Android-
cheers
Worked for me. Thank you @abdelrahmana. [BTW I have given star at your repo :) ]
Just added permission before initialization and Woala......
i have been working on this issue and i fixed it please go a head to my modification and clone it
https://github.com/abdelrahmana/bubble-Android-
cheers
Hey why don't you make a proper PR to this fix? It will be a valid help to all of us thanks, in case you need help to do that I can help you. ❤️
I find a solution and worked for me
in Build.grade (Module:app)
replace compile 'com.txusballesteros:bubbles:1.2.1'
to
implementation 'com.github.txusballesteros:bubbles-for-android:develop-SNAPSHOT'
I find a solution and worked for me
in Build.grade (Module:app)
replace compile 'com.txusballesteros:bubbles:1.2.1'
to
implementation 'com.github.txusballesteros:bubbles-for-android:develop-SNAPSHOT'
Because it's not official release its from develop branch
'com.github.txusballesteros:bubbles-for-android:develop-SNAPSHOT'
This worked. Can't this be applied to the live version of the package?
I find a solution and worked for me
in Build.grade (Module:app)
replace compile 'com.txusballesteros:bubbles:1.2.1'
to
implementation 'com.github.txusballesteros:bubbles-for-android:develop-SNAPSHOT'
This is a fair workaround considering that dev branch is 2 commits ahead, fixing this exact issue. Furthermore, I had to add "maven { url "https://jitpack.io" }" under repositories for this to work. I followed this answer https://stackoverflow.com/questions/33058358/jitpack-io-failed-to-resolve-github-repo