-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pls,Support push notification for event call when Application is close / on background. #8
Comments
Yes, we plan to add background calls support in one of near release. |
Yeahhhh, I love U 3000 <3 |
+1 for this awesome feature as this is essential for each VoiP App :) |
Is there a way to implement this with the current API? In a background process for example with the workmanager plugin perhaps? |
hello guys, we updated our Push Notifications documentation for Flutter. You can try use it to implement Push notifications to your Flutter projects before we implement it in our sample. |
For the Android platform, you have to set them to the
For Android, it is expected behavior. You have to do it yourself. For example, you can use flutter_local_notifications plugin for it. |
Thank you for the details. It might be useful if you can add it in your documentation. I wasted 2 days trying out different things and hoping it will work without anything external. |
Please, give me suggestion how to get notification using flutter_local_notifications for Push notification. I got below error:
|
Hello @TatankaConCube
I get device id is this way using
Is this right way or I have to implement other method?
So, help me to solve this issue. |
you have to use flutter plugins for this, in our documentation, we provided the needed code for this.
it can be changed during the app work, please, see our documentation, how to get the current token, and how to subscribe to its changes.
it is a static unique identifier for your device on the ConnectyCube server. You provided the correct code for getting it.
need more details about this issue:
|
@TatankaConCube
Failed notification log : - have some receivers subscription in the Connectycube admin panel? - for which platform (Android or iOS) do you send notification? - how you send notification (via API from app or from Admin panel)? I want to send send using firebase with your dashboard. |
Hello @TatankaConCube I want to use notification functionality in chat application. I implemented this functionality using your connectycube_sdk package. I follow each and every steps to do this functionality and also I successfully implemented this functionality. But in this code I face one issue is that when user is offline or not in the dialog page I can't get notification. In terminal there is no any error display. Every API from your server is called successfully and it displays log of generated notification. When I push on send button notification generates which displays in connecty_cube dashboard. Also device is registered in Push Notification -> Device subscription panel. Every notification displays in Push Notification -> Queue panel. but in this panel Start date, End date, Period are not displayed. When I click on status I get this issue in log received error (Failed to deliver to all recipients. Errors: InvalidRegistration). So I can't get receiver for notification. I use android device for notification. I also link my application with firebase, but in firebase console -> cloud messaging there is no any data display for notification. Please help me to solve this issue asap. I also displays image in above comment. Please check it. this is log.
|
There are descriptions of possible errors on sending push notifications from Connectycube server to FCM. Looks like you have the wrong (or expired) token in the subscription. Try delete the subscription from the admin panel and create a new one, then try to send push notification again. |
Hello @TatankaConCube |
And you get the same error again? Right? |
Yes |
Did you configure the required tokens in the ConnectyCube admin console? Did you add google-services.json file to your Android project? |
This is my google-services.json file.
|
hmm, it is strange ((( |
void init() async {
}
// Called when your app become foreground from background by PushNotifications Future onResume(Map<String, dynamic> message) {
// Called when receive PushNotifications when app was stopped (Android only). static Future onBackgroundMessage(Map<String, dynamic> message) {
}
|
Yes, sure, it is the main problem. But I do not understand, which token you used before for creating a subscription? |
flutter_apns plugin depends on firebase_messaging plugin, please read its Readme and add needed configs to your project. |
I use this method for getting token
I use flutter_apns: ^1.3.1. |
Dear @TatankaConCube I already done all this requirement. I have only one confusion for this this plugin. Should I have to mention below method which is given in firebase_messaging documentation? |
how you created subscriptions before without this method? Whit token you used?
No, you don't need this method, it is just an example, how to send push notification from the app. Our server does similar logic when you create an event or send a push notification from the ConnectyCube admin panel. But you can use it for testing push notifications on your device without the Connectycube server. |
I use in all above method in this way. If I made mistake then suggest me.
Now, I get token in
|
Try to clear all app data, then completely remove it from the device and install it again. During writing documentation, I did the same step by step and it worked. I can't understand why it does not work for you ((( |
|
@TatankaConCube |
I can receive notification, if I get onMessage() method in 'data' parameter rather than 'notification'. Sorry, still I did not receive notification on device. But It successfully generated from connectycube dashboard.
|
@TatankaConCube |
it can be like:
|
I did exact same as you suggest but still I face that title and parameter null in onMessage() method. What should I do now? params.parameters = { |
in the 'data' field? are you sure?
|
Yes.
|
what about it:
why you say
I'm confused... |
sorry for this. |
do you mean notification in the Android notifications center? For the Android platform, you should do it by yourself, please read our documentation (at the end of the section). For iOS, it is a system feature and here you can manage only actions, which happen by clicking on the notification. |
Hello @shivanijha002 I face same issue as you mentioned above. Please suggest me how can I use flutter_local_notifications with firebase_messaging for Android device notification. Please suggest me asap. |
@Significantinfotech2020 in your callback |
Hello @TatankaConCube, I share my chat_dialog_screen.dart file. In this file I implemented flutter_local_notifications with firebase_messaging, but still I can't get any notification on receiver device. In this code I got notification on sender device with only notification title. |
There are few plugins for listening push notifications and a lot of code is commented. Do you receive a push event in your callbacks? |
@Significantinfotech2020 today I pushed draft code for enabling push notifications in the Chat sample. The main logic for subscription, listening push notifications and showing local notifications placed in push_notifications_manager.dart At current moment works (tested on iOS and Android):
Note: it is just a draft and not all features implemented yet, for example, navigation to concrete chat by notification click, etc. |
@TatankaConCube I checked this code. It's working as you describe. Thanks 👍 |
Hello @TatankaConCube |
In which way do you send push notification? From admin panel? |
I am sending notification as per your updated code.
No. |
Did these notifications present in the queue in the Admin panel? |
when I receive notification on device that entries were in admin panel, but when I not get notification, that entry was not in queue. |
it means you have a problem not with receiving but with sending notifications, investigate this part of your code |
@TatankaConCube In below method 6543 is what? Is this application ID or Account ID or anything else?
|
There is code not from our SDK, it is a code of flutter_local_notifications plugin. There is the description for this code example. In my example, |
Implemented in the latest version. Closing... |
I hope that, connectycube-flutter lib, will be support call method when application on close or background for Android and IOS.
The text was updated successfully, but these errors were encountered: