[notifications v3.0.0] FATAL EXCEPTION
Device / Emulator and OS
- Device: Samsung S20
- OS: Android 13
Describe the bug
App crash in debug and release mode, some notifications are handle, but for unknown reasons, some notifications crash the plugin
To Reproduce
Simply use the plugin
Actual behavior
D/AndroidRuntime(19862): Shutting down VM E/AndroidRuntime(19862): FATAL EXCEPTION: main E/AndroidRuntime(19862): Process: net.example.app, PID: 19862 E/AndroidRuntime(19862): java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String java.lang.CharSequence.toString()' on a null object reference E/AndroidRuntime(19862): at dk.cachet.notifications.NotificationListener.onNotificationPosted(NotificationListener.java:40) E/AndroidRuntime(19862): at android.service.notification.NotificationListenerService.onNotificationPosted(NotificationListenerService.java:456) E/AndroidRuntime(19862): at android.service.notification.NotificationListenerService$MyHandler.handleMessage(NotificationListenerService.java:2352) E/AndroidRuntime(19862): at android.os.Handler.dispatchMessage(Handler.java:106) E/AndroidRuntime(19862): at android.os.Looper.loopOnce(Looper.java:226) E/AndroidRuntime(19862): at android.os.Looper.loop(Looper.java:313) E/AndroidRuntime(19862): at android.app.ActivityThread.main(ActivityThread.java:8757) E/AndroidRuntime(19862): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(19862): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) E/AndroidRuntime(19862): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067) I/Process (19862): Sending signal. PID: 19862 SIG: 9
Found the problem: I/flutter ( 9209): {packageName: com.google.android.googlequicksearchbox, title: null, message: null} some notifications have title/message null