unify_fcm

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

unify fcm

Unify library Crafted by the UNICODE Team.
A Light-weight Flutter package to send remote push notifications using Firebase Cloud Messaging (FCM) v1 API and generate access token from service account.πŸ‡ΈπŸ‡¦πŸ’™πŸ‡§πŸ‡©β€οΈπŸ‡ͺπŸ‡¬
Features support #

Access Token: You can create bearer access token using your project service account json file.
Text Notification: Sending reguler text notification with title, and body πŸ“².
Image Notification: You can send image too, if your app support image notification πŸ˜‰
Topic Notification: Send notification to all subscribers of topic πŸ“¬.


Getting started #
Please have a look at our /example project for a better understanding of implementations.
Initialize it in the main.dart file to send the notification.
UnifyServices.initUnify(
config: UnifyConfig(
fcmAccessToken: "your_fcm_access_token_here",
projectName: "your_firebase_project_name_here",
),
);
copied to clipboard
Generate the bearer access token.
String? token = await UnifyServices.genTokenFromServiceAcc(
serviceAccount: {
"type": "service_account",
"project_id": "",
"private_key_id": "",
"private_key": "",
"client_email": "",
"client_id": "",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url":
"https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "",
"universe_domain": "googleapis.com"
},
);
copied to clipboard
Send notification to user using fcm token.
String? id = await UnifyServices.sendNotification(
notification: UnifyNoficationModel(
token: "your_user_fcm_token_here",
notifyId: "1",
title: "Hi Unify Fan :)",
body: "Let's go to the Unify world ^_^",
imageUrl:
"https://images.pexels.com/photos/9551192/pexels-photo-9551192.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",
));
copied to clipboard
Send notification to topics channel.
String? id = await UnifyServices.sendNotification(
notification: UnifyNoficationModel(
topic: "your_topic_name_here",
notifyId: "1",
title: "Hi Unify Fans :)",
body: "Let's go to the Unify world ^_^",
imageUrl:
"https://images.pexels.com/photos/9551192/pexels-photo-9551192.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",
));
copied to clipboard
If you enjoyed it, then give it a star ⭐️ and like πŸ‘πŸ» and for more arts & crafts 🎨 from our team kindly visit here Team UNICODE. Until next time, keep coding and stay awesome πŸ˜‰

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.