I'm thinking of writing a simple Android which performs a task (e.g retrieve current location or send some values to DB) with these requirements:
- The task is executed on certain interval, say per 1 minute or 5 minutes
- Every time the task starts, it should run even though the app is minimized.
- The task can be cancelable/resumable at any time (by the user, clicking a button in the app).
What's the proper way to implement this. IntentService? JobIntentService? JobScheduler?