I'm writing a program that scans a network, and I want it to run in the background regardless if the application is running or not. From what I've read the only way to have a service that continues after the application has been destroyed is one that runs on a separate process. I also want it to to perform this one task once every x minutes. What is the best way to go about doing this?
Asked
Active
Viewed 42 times
-1
-
Possible duplicate of [Android - Periodic Background Service - Advice](http://stackoverflow.com/questions/10420358/android-periodic-background-service-advice) – Dhaval Parmar Feb 16 '16 at 04:04
1 Answers
0
Use AlarmManager
api instead. It allows to run tasks periodically, even if app was not active since last boot.

Raiv
- 5,731
- 1
- 33
- 51