GPS Game for cyclists - 2

Well when I went for a cycle yesterday to test out my new GPS game things did not go according to plan. I was just collecting the GPS data from the activity, so when the activity was not in the foreground (for example when I switched off my screen and put the phone in my jersey) the gps collection stops. A pretty fundamental mistake. I have substantially modified the code to consist of a simplified Activity for which you can start and stop GPS collection (and effectively the workout) and a service which does the actual collection.
This works well now (at least before I go out on the bike). When I start the data collection service an icon appears in the status bar telling me that the service is running. I can then leave the activity and do other things and collection will continue. When I am ready to stop the data collection I pull down the status bar and click on the notification. This brings me to the simple activity from where I can stop proceedings.
Lots more to do on this, but made good progress today.
The code is still available here.

Comments

Popular posts from this blog

AutoCompleteTextView backed with data from SQLite in Android

Building a choropleth map for Irish agricultural data

Using Statistics to Hire Developers