Android Question FirebaseNotifications crash with Android 5.1 (api 22)

zolive33

Member
Licensed User
Hi,

I think there is a problem with notifications on android 5.1: the sample app crashes when the notification is displayed.

No problem with other versions of Android.

Log :
--------- beginning of crash
FATAL EXCEPTION: main
Process: com.android.systemui, PID: 830
java.lang.NullPointerException: Attempt to invoke virtual method 'android.graphics.ColorFilter android.graphics.drawable.Drawable.getColorFilter()' on a null object reference
at com.android.systemui.statusbar.NotificationTemplateViewWrapper.resolveViews(NotificationTemplateViewWrapper.java:82)
at com.android.systemui.statusbar.NotificationTemplateViewWrapper.<init>(NotificationTemplateViewWrapper.java:66)
at com.android.systemui.statusbar.NotificationViewWrapper.wrap(NotificationViewWrapper.java:38)
at com.android.systemui.statusbar.NotificationContentView.setContractedChild(NotificationContentView.java:125)
at com.android.systemui.statusbar.BaseStatusBar.inflateViews(BaseStatusBar.java:1389)
at com.android.systemui.statusbar.BaseStatusBar.inflateViews(BaseStatusBar.java:1288)
at com.android.systemui.statusbar.BaseStatusBar.createNotificationViews(BaseStatusBar.java:1713)
at com.android.systemui.statusbar.phone.PhoneStatusBar.addNotification(PhoneStatusBar.java:1326)
at com.android.systemui.statusbar.BaseStatusBar$5$2.run(BaseStatusBar.java:453)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
 

Attachments

zolive33

Member
Licensed User
The problem is with the local notification. Are you able to show a notification with:
B4X:
'in Activity_Create
 Dim n As Notification
   n.Initialize
   n.Icon = "icon"
   n.SetInfo("test", "Test", Me)
   n.Notify(1)
?

The problem might be related to the icon.
Yes Erel, the problem comes from the icon. I reproduce the crash when launching the app and the icon is not displayed.
 
Top