Closed paour closed 5 years ago
Hello 👋, to help manage issues we automatically close stale issues. This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?
This issue will be closed in 15 days if no further activity occurs. Thank you for your contributions.
This is a reasonable point, and if the general stance is that badging isn't great (per discussion here #2076) then I'd expect more people to opt out on Android and decrease their dependency size, but if it's marked optional then you wouldn't necessarily expect to have to platform-check your code while still badging on iOS. If someone posts a PR for this I'd include it in a release for v5 and forward port to v6 etc
Hello 👋, to help manage issues we automatically close stale issues. This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?
This issue will be closed in 15 days if no further activity occurs. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information.
Issue
On Android, when not using the optional ShortcutBadger dependency, the app suffers a native crash when setting a badge (for iOS).
The crash log contains
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lme/leolin/shortcutbadger/ShortcutBadger;
, which makes sense.I would expect an optional dependency to be handled in a safer manner by RNFirebase, testing whether that class is available before trying to use it, and writing a warning to the log rather than crashing…
Another way to handle this would be to implement an
IOSNotifications
class, similar toAndroidNotifications
, to expose iOS-specific features (since explicit badges on Android are not standard, and the OS/launchers handle displaying notification dots on top of app icons that have outstanding notifications).Environment
Both, but the crash affects only Android.
macOS High Sierra
Not dependant on build tool version.
React Native
version:0.55.4 (not specific to this version)
React Native Firebase
Version:4.3.8
Firebase
Module:Notifications
typescript
?No