-
Notifications
You must be signed in to change notification settings - Fork 767
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix: Android crash when opening notifications #967
Fix: Android crash when opening notifications #967
Conversation
* Avoid undefined payloads * Check for null instead of relying on try/catch * Remove redundant null check * Wrap in try/catch instead of null checks
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot!
Of course, you're right but a crash is unacceptable |
@DanielEliraz is there anything I need to do to get this merged in? I merged in latest |
@C-Flatla Will be soon in production |
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
mNotificationProps.asBundle()
intry/catch
to prevent app crashesAny necessary explanation of decisions you made
Picture of cat