@adamjnav Thanks for the response.
Managed workflow
expo-notifications version is 0.13.3
I’m actually doing that. Because scheduled notification testing will slow me down, I’ve added a button that will trigger a notification on click.
const NotificationTest = () => {
const settings = useSelector((state) => state.settings);
const notificationSound = getNotificationSoundFilename(settings[REMINDER_AUDIO_SETTING_NAME]);
const handleNotification = async () => {
console.log('notificationSound', notificationSound);
const testChannel = 'test-channel';
const channel = await Notifications.setNotificationChannelAsync(testChannel, {
name: 'Test Channel',
importance: Notifications.AndroidImportance.MAX,
vibrationPattern: [0, 250, 250, 250],
lightColor: '#FF231F7C',
sound: notificationSound,
});
console.log('channel', channel);
const schedule = await Notifications.scheduleNotificationAsync({
content: {
title: 'Test Notification',
body: 'This is a test notification',
vibrate: [0, 250, 250, 250],
sound: notificationSound,
},
trigger: {
seconds: 1,
channelId: channel?.id,
},
});
console.log('schedule', schedule);
};
return (
<Button>
<Text onPress={handleNotification}>Test</Text>
</Button>
);
};
I’ve notification handler setting in another place but it’s in effect.
Only thing I noticed is that channelId
. As it’s irrelevant in iOS, should I remove that prop when it’s iOS?
One possible thing to try is manually implementing the custom sound and testing locally (see the dropdown under this section of the docs)
I believe it doesn’t apply in my case as it is Managed workflow!