flutter-plugins
flutter-plugins copied to clipboard
Notifications - Error when whatsapp message is deleted
Device / Emulator and OS
Please complete the following information for each phone and/or emulator you're experiencing this bug on:
- Device: Xiaomi Mi 11 Lite
- OS: Android 11
Describe the bug
When receiving a message from whatsapp and after deleting it (with delete for everyone) it crash the app.
Error: E/AndroidRuntime( 7066): FATAL EXCEPTION: main E/AndroidRuntime( 7066): Process: com.example.app , PID: 7066 E/AndroidRuntime( 7066): java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String java.lang.CharSequence.toString()' on a null object reference E/AndroidRuntime( 7066): at dk.cachet.notifications.NotificationListener.onNotificationPosted(NotificationListener.java:41) E/AndroidRuntime( 7066): at android.service.notification.NotificationListenerService.onNotificationPosted(NotificationListenerService.java:374) E/AndroidRuntime( 7066): at android.service.notification.NotificationListenerService$MyHandler.handleMessage(NotificationListenerService.java:2131) E/AndroidRuntime( 7066): at android.os.Handler.dispatchMessage(Handler.java:106) E/AndroidRuntime( 7066): at android.os.Looper.loop(Looper.java:236) E/AndroidRuntime( 7066): at android.app.ActivityThread.main(ActivityThread.java:8059)
Expected behavior
Receive a notification with "This message has been cancelled"
Actual behavior
App crashed