Please provide the following:
- SDK Version: 38
- Platforms(Android/iOS/web/all): Android
Hi,
I’m trying to get the notification channels to work for my expo app. However I had no luck with it so far. Every time I send a notification via the expo notification tool it won’t get delivered when I specify a channel.
The expo app however shows the the matching channel under the notification settings.
I’m trying to set up the channel the following way:
const testChannel: NotificationChannelInput = {
name: 'testchannel',
importance: AndroidImportance.MAX,
bypassDnd: false,
description: 'testchannel',
lightColor: MAIN_THEME_ORANGE,
lockscreenVisibility: AndroidNotificationVisibility.PUBLIC,
showBadge: true,
enableVibrate: true,
enableLights: true,
vibrationPattern: [250, 250]
}
const res = await setNotificationChannelAsync('testchannel', testChannel);
if (null === res) {
console.warn('Could not set NotificationChannel')
}
This piece of code gets executed when starting the app and shows no errors.
If I don’t specify a channel the notification is delivered without any problems.
Any suggestions?