-
Notifications
You must be signed in to change notification settings - Fork 16
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
Getting push notification on android terminate state #434
Comments
Thanks for the report. We're likely to need more information from you in order to diagnose or attempt to reproduce this. Have you followed all of the Android steps in our Flutter-specific Push Notifications documentation? Could you double check? Is there anything else in that document that might help you, perhaps? |
Yes, I have followed all the steps. And I do not use firebase_messaging. I only use ably. I get notification on backround and foreground state and not in terminate state.
|
I've not tried it myself, but reading that document I note that we have a From the Data Message / Background Notification section in the aforementioned documentation:
Future<void> _backgroundMessageHandler(ably.RemoteMessage message) async {
print('Just received a background message, with:');
print('RemoteMessage.Notification: ${message.notification}');
print('RemoteMessage.Data: ${message.data}');
}
ably.Push.notificationEvents.setOnBackgroundMessage(_backgroundMessageHandler);
|
Yes I have set it. Still not getting any notification on android terminate state. iOS works perfectly. Android background and foreground works perfectly. Only android terminate state is problem
|
@ali-almas This might be related to battery optimizations, could you give us more information about your setup? |
@ali-almas Also, how are you putting your app in a terminated state? If you're "force stopping" it from the settings, then it looks like it's working as intended. If that's the case, please take a look here, and especially:
I've tested the Example app a bit with my android device (Redmi note 9 pro), and it adheres to this behaviour - if I force stop the app, I'll stop getting any notifications. |
I have problem on Android devices that I get notifications only on background and foreground state. If app is in the terminate state, app does not get any notification
┆Issue is synchronized with this Jira Task by Unito
The text was updated successfully, but these errors were encountered: