Closed HareshIndiaNIC closed 1 year ago
Keagan Ellis (CometChat Team) replied:
Hey,
Thanks for reaching out with your concern. I am Keagan from the Support team.
We do not have the documentation for push notification integration with flutter. However, it is possible to integrate push notifications.
I am looping in our Solutions team to share some more information on how you can integrate push notifications using Flutter.
Regards.
Keagan Ellis CometChat
Thanks, waiting for more information regrading the push notification.
Aditya (CometChat Team) replied:
Hello Haresh,
Unfortunately, we do not have the docs ready for the same. We are working on the same and the docs will be live soon.But you can achieve the same using the below steps:
You can select either to use an existing Firebase project or to create a new Firebase project. If you already have apps registered in an existing Firebase project, the FlutterFire CLI will attempt to match them based on your current Flutter project configuration.
Once the settings are correctly configured, the Push Notifications extension will start sending push notifications for all the messages shared across in your app. Please make sure that you select both Android and iOS platforms while configuring the extension.
One the client end, please follow the below steps:
a) firebase_messaging b) firebase_core
FirebaseMessaging messaging = FirebaseMessaging.instance; final String? fcmToken = await messaging.getToken(); if (fcmToken != null) { CometChat.registerTokenForPushNotification(fcmToken, onSuccess: (_) { print("registration Successful"); }, onError: (CometChatException e) { print("${e.details}"); });}
Also register listener to be called when fcmToken is refreshed FirebaseMessaging.instance.onTokenRefresh.listen((fcmToken) { CometChat.registerTokenForPushNotification(fcmToken, onSuccess: () { print("registration Successful"); }, onError: () { print("error"); });}).onError((err) { // Error getting token.});
Create a onMessage listener to Firebase messaging which will give you events on every message received.
Hope this helps. Please do let us know in case you face any difficulties. We will be happy to help you in case any roadblocks are encountered.
I am also forwarding this request to our product team Here is what you can expect:
Rest assured we will read your request, but we may not respond Our Product Managers dedicate time each week to read your requests, answer your questions, ask you questions about your feedback, and lead conversations around areas they’re focused on. That said, we simply can't respond to everything. Requests are not guaranteed a response or inclusion in any product backlogs or roadmaps.
We don’t share timelines Occasionally, we’ll share very general ideas of what is or isn’t on a roadmap, or roughly when you might expect to see something roll out. However, we do not share specific dates. While we are as upfront as we can be, our roadmap is full of projects and we generally don’t provide timelines for new features or changes.
Thanks
Aditya Gokula CometChat
Hello any updates on this?
Describe the problem