I'm trying to set my notifications like this:
await Notifications.scheduleNotificationAsync({
content: {
title: "EnergieM - Pripomienka",
body: "Spravte si novy odpocet",
sound: "default",
},
trigger:{
hour: 14,
minute: 38,
type: "weekly",
weekday: 3,
},
});
The result must be that the person chooses when to receive the notification (on a specific day every month or a specific day every week or every day)
But I'm always getting the same error: [Unhandled promise rejection: Error: Failed to get next trigger date for the trigger. Trigger of type: calendar is not supported on Android.]
Can someone please help me with these notifications? I am new to Expo and React-Native.
Would be grateful for any help!
Im not that good with using it either however I was able to get it to work. Dont know if its the best way or the intended way. But I did this.
Basically I just calculate how long a day, hours etc is in seconds and call it by the total amount of seconds. You can easily calculate in how many days the notification is going to be called, and then just multiply the amount of days with 86400 to get the total amount of seconds untill then! If you want it reoccuring I do not know the answer. Hopefully this helps if not then I cant help you any further.