I have a serious problem with my notification.
Sometimes, when my application publishes the same user notification, I get this error:
android.app.RemoteServiceException: Bad notification posted from package com.packagename: Couldn't expand RemoteViews for: ClassName(package=com.packagename id=0 tag=null notification=Notification(vibrate=null,sound=null,defaults=0x0,flags=0x22)) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1093) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:130) at android.app.ActivityThread.main(ActivityThread.java:3906) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:507) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:840) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:598) at dalvik.system.NativeStart.main(Native Method)
What should I do?
The notification only contains LinearLayout, TextViews and ImageViews, and it works great most of the time.
Is there a way to circle this error with try / catch so that android does not stop my application in this way?
Many thanks...
android exception notifications
Meroelyth
source share