Building an (Android) app for myself through Expo and React Native. I want to send scheduled time-sensitive notifications to the user (me). If the user hasn't interacted with a notification after an hour, it's irrelevant, so I would like to cancel the notification without the user needing to dismiss it. I would like to schedule many of these auto-dismiss notifications.
- Doesn't look like there's a way to "schedule" a cancellation. Seems like I could use
setTimeout
andcancelScheduledNotificationAsync
to cancel it after an hour. Is there a better way? - Even if
setTimeout
andcancelScheduledNotificationAsync
works for the first notification I've scheduled, it seems like I could run into trouble with the second or third. That's a lot of time to be waiting insetTimeout
. I'm worried about everything getting messed up if the device runs out of battery or something. Better ideas?
Thank you for your help! :)