Configure Push Notification channels on Android
mainFor Android 8.0 (API 26) and higher, you should use notification channels. The SDK determines the channelId in this order:
- The
channelIdexplicitly set in the incoming FCM notification. - The
default_notification_channel_idspecified inAndroidManifest.xml. - The fallback channel provided by the Firebase SDK.
Warning: If you use option 1 or 2, you must still create the channel in your code using createChannel(...) with a matching ID. If you fail to do this, the SDK will fallback to the default Firebase channel.
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="@string/default_notification_channel_id" />