- Fixed FCM token refresh not being handled - Added missing
onNewToken()handler toFcmInstanceIdListenerService. Previously, when FCM automatically refreshed a device's push token (which can happen after extended inactivity, security updates, or OS updates), the app would not be notified of the new token. This caused push notifications to silently stop working for affected users because the backend was still sending to the old, invalid token.
-
Added
isRefreshproperty to token registration event - TheRegisteredevent now includes anisRefreshboolean property (Android only) that indicates whether the token was received due to an FCM-initiated refresh (true) or from app initialization/manual refresh (false). This allows your backend to distinguish between initial registrations and token refreshes for analytics or debugging purposes.Important for client apps: Ensure you register the
remoteNotificationsRegisteredevent listener early in your app lifecycle (ideally in your root component constructor oruseEffect). This listener will now be called whenever FCM refreshes the token, not just on initial registration. Your app should sync the new token to your backend each time this event fires.// In your root component useEffect(() => { const subscription = Notifications.events().registerRemoteNotificationsRegistered((event) => { console.log("Device Token Received", event.deviceToken); if (event.isRefresh) { console.log("This is an FCM-initiated token refresh - old token is now invalid"); } // Always sync the token to your backend syncTokenToBackend(event.deviceToken, { isRefresh: event.isRefresh }); }); Notifications.registerRemoteNotifications(); return () => subscription.remove(); }, []);
- react-native 0.60 Support
This version requires an additional installation step in order to identify the correct build flavor on android, as described in our Installation doc.
- Resolve intent by extra key and not by
google.message_idstring, Addresses #296. #5056657 by yogevbd
- Reverted #349, This caused our e2e tests to fail, therefor we reverted this PR and will resolve this issue in the next version #0b70828 by yogevbd
Moved our builds to CircleCI and added iOS unit and e2e tests coverage.
- Remove verify notification #57190f7 by yogevbd
- Bring native unit tests back to life #11f370b by yogevbd
- Updated the android installation setup guide.
Make sure settings gradle imports from '../node_modules/react-native-notifications/android/app' and not '../node_modules/react-native-notifications/android'
include ':reactnativenotifications'
project(':reactnativenotifications').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-notifications/android/app')