I'm currently working on an Android app that uses several Firebase functions. In the Realtime Database I have a date (the date a book is due) and I need to notify the user when that date is near (say, 1 day before the date in the database). Firebase cloud functions doesn't seem to have a specific trigger to do this, as nothing in the database is changing.
I have seen this thread, which can set an alarm/notification for a future date, but I don't know how to stop it once it's been set; I need to be able to cancel the notification if they return the book. This does trigger a change in the database, so I would have an event to use to cancel it, if there was a way to do so.
Is this the best way to do this, or is there a way to implement it using Firebase? And if this is the way to go, how would I cancel a scheduled notification?