wix / react-native-notifications

React Native Notifications
MIT License
3.23k stars 763 forks source link

Fix: Android crash when opening notifications #967

Closed C-Flatla closed 1 year ago

C-Flatla commented 1 year ago

What's in this PR?

This PR fixes a NullPointerException on Android when app is resumed by opening a notification.

Why was this PR created?

This fixes issues:

Quick summary of the changes you made

Any necessary explanation of decisions you made

Picture of cat

cat

fotos commented 1 year ago

Shouldn't we be working on fixing the underlying (root) cause instead of sweeping the problem under the (logging) rug? 🤔

Despite the various problems this library has and the numerous hours I spent debugging (and still do) to get Android to handle notifications correctly in all states (dead/background/foreground), personally, I'm not very fond of the approach taken here.

DanielEliraz commented 1 year ago

Shouldn't we be working on fixing the underlying (root) cause instead of sweeping the problem under the (logging) rug? 🤔

Despite the various problems this library has and the numerous hours I spent debugging (and still do) to get Android to handle notifications correctly in all states (dead/background/foreground), personally, I'm not very fond of the approach taken here.

Of course, you're right but a crash is unacceptable

C-Flatla commented 1 year ago

@DanielEliraz is there anything I need to do to get this merged in? I merged in latest master so it was up to date 😄.

DanielEliraz commented 1 year ago

@C-Flatla Will be soon in production