Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RemoteServiceException for Android 9 and Android 10 #45

Closed
vsay01 opened this issue May 13, 2020 · 1 comment
Closed

RemoteServiceException for Android 9 and Android 10 #45

vsay01 opened this issue May 13, 2020 · 1 comment

Comments

@vsay01
Copy link

vsay01 commented May 13, 2020

It's working fine for Android 8 but error with Android 9 and Android 10.

Fatal Exception: android.app.RemoteServiceException: Bad notification for startForeground: java.lang.RuntimeException: invalid channel for service notification: Notification(channel=null pri=0 contentView=null vibrate=null sound=null tick defaults=0x0 flags=0x60 color=0x00000000 vis=SECRET internalType=0 internalPriority=0 internalGroupPriority=0 internalFlag=0)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1965)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:224)
       at android.app.ActivityThread.main(ActivityThread.java:7081)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:536)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:928)

Anyone find solutions for this ?

@vsay01
Copy link
Author

vsay01 commented May 17, 2020

I resolved this by create channel before create notification in getPersistentNotification(int id) of StandOutWindow class.

@vsay01 vsay01 closed this as completed May 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant