Last updated:
0 purchases
fcm token manager
Fcm Token Manager #
A Very Good Project created by Very Good CLI.
Description #
Interface between Firebase Core and Firebase Messaging which helps in managing FCM tokens and notifications permissions.
It makes the following assumptions:
Your app has a backend
Your backend allows for updating user token and deleting of a user token
Your backend stores FCM tokens associated with string-based user ID
Tokens #
onLogin: It will check when was the last time your backend was updated with an FCM token and update it if it was longer than configured token ttl
onLogout: It will remove token from backend on logout
Storing user preference re: notifications and asking for permission #
Calling getAppNotificationPreference:
will return current permission status, unless no permission is set in which case it will
ask user for permission (using native iOS/Android process)
Using setAppNotificationPreference enables user to switch off notifications without using the device native preferences
this simply calls your backend to delete the FCM token
Installation 💻 #
❗ In order to start using Fcm Token Manager you must have the Flutter SDK installed on your machine.
Install via flutter pub add:
dart pub add fcm_token_manager
copied to clipboard
Continuous Integration 🤖 #
Fcm Token Manager comes with a built-in GitHub Actions workflow powered by Very Good Workflows but you can also add your preferred CI/CD solution.
Out of the box, on each pull request and push, the CI formats, lints, and tests the code. This ensures the code remains consistent and behaves correctly as you add functionality or make changes. The project uses Very Good Analysis for a strict set of analysis options used by our team. Code coverage is enforced using the Very Good Workflows.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.