I would prefer AlarmManager , because I try not to start constantly running services, if I really do not need it, but it really depends on how you use it.
If it were me, I would (based on a limited description): -
- Configure
AlarmManager to shoot in 10 minutes. - In response to an alarm, start a service that checks the data.
- After the survey, he must set a new alarm in order to start it again in 10 minutes.
- The service is shutting down.
source share