I have made an application in which alarms for various events are stored by the user. This app runs on both android and i-devices. So, the app raises an alarm when the event occurs. But if I close the application, obviously it doesn’t remind me of the alarms. I want that even if the user closes the application, he should be informed of the alarm.
From what I understand, there are two ways this could happen.
1 -> Either run the application (using threads) in background.
2 -> As soon as user initiates any alarm, this gets stored in a database, and every time application runs and new alarms are installed, database keeps getting updated. But then again I have to make another app for database separately and that would be running in the background.
I just want to avoid it running in the background. Is there any feasible solution for it?
Thanks
On iOS you can only run very specific background tasks.
Depending on when an alarm is needed you could use local notifications or push notifications, see: Apple Documentation