-
Notifications
You must be signed in to change notification settings - Fork 218
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
[ANDROID] Handling background messages from Dart code #464
base: main
Are you sure you want to change the base?
Conversation
This reverts commit 3288829.
I'm frustrated that this feature is not implemented in SDK already! |
Getting this warning with Flutter v2.10.1 |
I've just tried to reproducing this, and the event handler fires. Could you share some info about your environment 👇🏽 ?
@apoorvpandey0 we shipped a fix for the issue you mentioned in PR #486 |
@iAmWillShepherd pl look into this issue for understanding my original question #557 |
Test this PR with this:
I'm implementing OneSignal because of its reliability. Previously I used FCM where all the data push messages could be handled since the same (Dart) point.
Background notifications handling is not possible with OneSignal in Flutter right now.
I added the background handling functionality in Android (even if the app was swiped away).
Create a
NotificationServiceExtension
withXNotificationServiceExtension
:And implement it in the
AndroidManifest.xml
:No current functionality has changed.
iOS (not completed)
The needed logic is the same as Android:
After some days I could create a
FlutterEngine
in theOneSignalNotificationServiceExtension
but there is a problem:OneSignalNotificationServiceExtension
in less than a second.Then the
OneSignalBackground
channel won't start.All I'm talking about has been coded and tested but not committed just to keep this PR clean with the Android changes.
This change is