Android Question GPS FusedLocationProvider issues

Mike1970

Well-Known Member
Licensed User
Hi everyone, i'm dealing with the GPS and FusedLocationProvider.

My app is costantly tracking with the FusedLocationProvider, but the SO kills the process because it drains too much current.

So my idea was to disable the gps and flp after it receives the location updates, and than re-enable it after 10 minutes, so i save energy, and the SO doesn't kill the process.

The problem is that if i stop the gps, i can't handle the "GPS_UserEnabled (Enabled As Boolean)" event anymore.. and i NEED it to show a dialog when the user disable the gps while the app i opened (even if the gps is in the 10 minutes shutdown period)

Any suggestions?

Thanks :D
 

Mike1970

Well-Known Member
Licensed User
You can use a timer that checks the value of GPS.GpsEnabled every minute or so.
Yes, in the end it's what i've done
I was hoping in something different, but it seems to work, so i think i will keep this solution
 
Top