For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
For Google FCM, ensure you’ve followed the Firebase setup mentioned earlier and have added the google-services.json or GoogleService-Info.plist file to your project root.
Xiaomi Services (Android only)
To register for push notifications with Xiaomi, provide the Xiaomi application ID and key, along with the push region.
Xiaomi Application Id and Xiaomi Application Key are mandatory fields which can be found under the application registered at Xiaomi Admin.
Push Region: Refers to the geographical region where push notifications are delivered.
Check if notification received is from Fyno and also handle it
To check if the push notification received is from Fyno, use FynoReactNative.isFynoNotification(remoteMessage) and to handle it, use FynoReactNative.handleFynoNotification(remoteMessage)
Android only
The following two functions (isFynoNotification and handleFynoNotification) is available only in Android and applicable only if you have notifications getting triggered from multiple sources.
jsx
1
// to receive and handle notifications when the application is in background or killed state
You can update the status of a notification (received, clicked or dismissed) using FynoReactNative.updateStatus().
Callback URL: You can obtain the Callback URL from the notification additional payload if the notification was triggered from Fyno.
Status: The status of the notification (one of RECEIVED, CLICKED or DISMISSED).
jsx
1
try {
2
FynoReactNative.updateStatus(
3
'callbackURL',
4
'status' // one of RECEIVED, CLICKED or DISMISSED
5
);
6
} catch (e) {
7
console.error(e);
8
}
Resetting User Information
To reset user information, call FynoReactNative.resetUser().
You can invoke this function when the user logs out of the application.
It handles the deletion of channel data associated with the current user, initiates the creation of a fresh user profile, and transfers the channel data to the newly created profile.
This feature proves to be invaluable if you plan to send push notifications to an application where the user has logged out.