I need to allow user to use my app even if network is not available and make server calls when network is available. I am using alarm manager-broadcast receiver- service pattern. I periodically retry to make api calls. I also added the boot receiver. But when user kills the app using overview screen, the alarms are not triggered again. Is there a better way to implement this common scenario?
Asked
Active
Viewed 3,037 times
2
-
Maybe this would help http://stackoverflow.com/a/3767766/6272369 – Marat Dec 12 '16 at 20:07
-
I think you implemented alarms incorrectly. It should run scheduled tasks regardless of whether app has been killed, or not – Vladyslav Matviienko Dec 12 '16 at 21:16
-
1@Vlad When you goto overview and swipe away the app, alarms of that app are cleared. – Yagna Dec 13 '16 at 02:26
1 Answers
2
You may use:- 1. JobScheduler 2. SyncAdapter
These will help you in case of periodically retry to make API calls

Sachin Tyagi
- 1,257
- 15
- 21