Reputation: 523
I'm creating an app to track user coordinates. i get a problem when gps is off. so that's what I want to ask. is it possible to turn on gps from background service android. like every 30min once, make service turn on gps and get location.
Upvotes: 1
Views: 305
Reputation: 3261
Service will not run for long time. There are restriction on background services. You can use Alarm manager for your functionality.
https://developer.android.com/reference/android/app/AlarmManager.html
Upvotes: 1