txusballesteros / bubbles-for-android

Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your development.
Apache License 2.0
1.48k stars 281 forks source link

App is crashing - permission denied on window type 2006 error #48

Open ShrutiSantosh opened 5 years ago

ShrutiSantosh commented 5 years ago

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.

Ahsaashafeez commented 5 years ago

Same issue!

mohElsayed1997 commented 5 years ago

same issue

janakact commented 5 years ago

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
SilvioLuis commented 5 years ago

Same here!

anibalbastiass commented 4 years ago

same issue

M-Cholewa commented 4 years ago

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); }

abdelrahmana commented 4 years ago

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

Try64 commented 4 years ago

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......

farhaanbukhsh commented 4 years ago

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. ❤️

princevatsal commented 4 years ago

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'

farhaanbukhsh commented 4 years ago

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

muriloinflue commented 4 years ago

'com.github.txusballesteros:bubbles-for-android:develop-SNAPSHOT'

This worked. Can't this be applied to the live version of the package?

cparello commented 4 years ago

Your better off copying the /bubbles folder from the working branches package and integrating it yourself

On Sat, Oct 17, 2020 at 4:48 PM muriloinflue notifications@github.com wrote:

'com.github.txusballesteros:bubbles-for-android:develop-SNAPSHOT'

This worked. Can't this be applied to the live version of the package?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/txusballesteros/bubbles-for-android/issues/48#issuecomment-711094640, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYTG63BWPXUCYKWIX5J4G3SLIULNANCNFSM4HK7EDAA .

-- Christopher Parello christopherparello@gmail.com 7472724713

KuiGoan commented 3 years ago

You can fix in this issue https://stackoverflow.com/questions/32224452/android-unable-to-add-window-permission-denied-for-this-window-type

nils-trubkin commented 3 years ago

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