I am developing a fitness app in react native.
I want to develop a rest timer feature for users to use to set rest time between workouts.
When the rest time ends, I want to send the user a local notification.
To make sure the user receives the notification even when the app in not in the foreground in Android, should I try to implement Android’s Foreground Service? or WorkManager?
I have read the documentation and have seen some youtube videos on this but am not sure..
What would make sure the users get the notifications without the OS delaying them?
2
Answers
AlarmManager should be used for precise alarms.
See Set an exact alarm for details.
As like @user18309290 said AlarmManager is the best choice to do it.
I recommend to use react-native-push-notification.
You don’t need other steps in installation specifically to implement only local notification.