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 FynoFlutter.isFynoNotification(messageData) and to handle it, use FynoFlutter.handleFynoNotification()
message is an instance of Firebase 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.
dart
1
// to receive and handle notifications when the application is in background or killed state
print("User status update error: $updateStatusException");
9
} else {
10
// User status update successful
11
}
Resetting User Information
To reset user information, call FynoFlutter.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 this particular channel data (push token) to the newly created profile.
This feature proves to be invaluable if you plan to send push notifications to an application even after the user has logged out.
It is also recommmended as it ensures that devices where the users have logged out are no longer associated with them.