[ANDROID] Handling background messages from Dart code#464
Open
efraespada wants to merge 6 commits intoOneSignal:mainfrom
Open
[ANDROID] Handling background messages from Dart code#464efraespada wants to merge 6 commits intoOneSignal:mainfrom
efraespada wants to merge 6 commits intoOneSignal:mainfrom
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 |
Contributor
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 |
bf90ab4 to
52b8389
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
NotificationServiceExtensionwithXNotificationServiceExtension: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
FlutterEnginein theOneSignalNotificationServiceExtensionbut there is a problem:OneSignalNotificationServiceExtensionin less than a second.Then the
OneSignalBackgroundchannel 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