Continue GPS calculations background

tufanv

Expert
Licensed User
Longtime User
Hi ,

I am coding an gps application. When application paused ( when switched to another program or screen) gps icon of phone is still active and my application is running on background but doesnt do the calculations ( average speed , total distance traveled ) altough the gps is active.

How can i make the applicaiton continue to do everything while running on backgorund ?

Thanks in Advance
 

JTmartins

Active Member
Licensed User
Longtime User
A service

Maybe moving all your GPS code to a service will do the trick.

If you have all your code in an activity, it will pause when the activity is not visible.

José
 
Upvote 0
Top