I am trying to implement notifications in an Expo app using expo-notifications. My trigger object in scheduleNotificationAsync conforms to the DailyNotificationTrigger interface, still I'm getting this error:
[Unhandled promise rejection: Error: Failed to schedule the notification. Trigger of type: calendar is not supported on Android.]
This is the snippet of code that produces the error:
Notifications.scheduleNotificationAsync({
content: {
title: 'Complete a quiz',
body: " Don't forget solve a quiz today!",
},
trigger: {
type: 'daily',
hour: 8,
minute: 0,
},
})
My target device is an emulator running on Android 10. Please help me identify and fix the problem.