Managing reminder alerts under device alarm system with scheduling initiated from an App.

dg2k 1,391 Reputation points
2022-10-23T09:51:26.393+00:00

I have events in my app which are date-based ones (typical example: a todo item by a specific date). I want to implement a reminder of such events, say, within N days of due date for Maui (Android in the first instance).

On the due date, I want to give the user the option of "remind me after N hours or minutes" and I would like this to be managed outside of my app by the device alarm system. It means, what was a day based coarse time becomes finer on the due date, and say a user wants to be reminded of that even after 3 hours.

I think, managing of the timed-event outside of an app is a good idea as scheduled events are better managed by the system alarm rather than the app trying to do what the system can do better (one obvious advantage being saving battery life).

Can an App schedule an alarm event and leave that to the device OS, and if this is possible, can an App interrogate what is scheduled under its request?
A related question is, what Alarm API and manifest permissions would I require for Android?

Background: I have looked at the AndroidX WorkManager and AlarmManager APIs but they are all covered in the context of implementing the Alarm within an App, rather than offloading the task to the device alarm system which I am looking for.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,380 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.