I'm looking to develop a mobile application that sends recurring task reminders to users via scheduled local notifications at specific time intervals. (Like notification every 15 minutes)

​As a web developer, I'm less familiar with the nuances of mobile operating systems, especially concerning background task execution and power management. I've researched and consulted multiple resources, but the consensus suggests this is challenging due to platform restrictions (e.g., preserving battery life, aspecially on iOS). Specifically, maintaining reliable, long-running background processes for precise, long-term notification scheduling seems problematic on modern iOS and Android versions.

Could you offer guidance on the most robust and platform-compliant way to achieve reliable, recurring, time-based notifications? Which approach or specific library/API (e.g., WorkManager on Android, UserNotifications framework on iOS with potential background fetch) would you recommend for maximum reliability and minimum battery drain?

(The best would be someting multiplatform as Flutter)

2 Replies 2

Depends on how you want to architect things. You can either do it server side (a server sends a push notification to the mobile device, which will respond to it with a notification). This is minimal client code, but requires the device to be online at the time the alarm goes off to work.

The other way is to do it locally. In that case, on Android you wouldn't use anything you mentioned. You'd just use AlarmManager or JobScheduler to schedule when the notification should go off, then when the alarm occurs you will create the notification you want to display. (You mentioned WorkManager- that's more for doing background work with a squishy definition of when it needs to be done. It isn't used for things that need an exact timer). This is a bit more client code, especially if you have multiple alarms scheduled (you need to store the data you want to display in the notification and display the correct one), but will work even without network.

On iOS you can use a repeating local notification or you scan schedule a series of local notifications if you don't want a simple repeating sequence. There is a limit to the number of notifications you can schedule in advance. You can schedule more notifications each time the user opens your app.

Or, you can use push notifications.

Your Reply

By clicking “Post Your Reply”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.