feat(android): use default or incoming notification channelId for foreground notifications #1649
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.
This PR drops the creation of a custom foreground channel on Android. Instead if will derive the
channelId
to be used for the foreground in the following order:channelId
setAndroidManifest.xml
1channelId
that the Firebase SDK provides for us. This channel will be created by the Firebase SDK upon receiving the first push message21 From the Firebase docs:
(see README also)
2 This is similar to how
react-native-push-notification
is handling this: https://github.com/zo0r/react-native-push-notification/blob/master/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationConfig.java#LL69C19-L69C50I think this makes way more sense than the current solution. It will also automatically inherit the channel settings set for the incoming notification. So that's more expected behaviour for the developer
By merging this PR #1423 becomes obsolete
Fixes #1368
Fixes #1388