Currently, location is got by each activity individually (albeit via a common superclass). The listeners are registered at activity startup, and unregistered at stop. This means that in transitions between activities, there is no location listener, and the location service is constantly being started and stopped.

This could be improved by moving the location handling into a common android Service, which activities register themselves against. The service will, in turn, register/unregister with the location service, but with a 5 second delay on unregistering, allowing subsequent registrations to cancel the unregister

Submitted by Cardiff Bus Android App on 27 February 2011 at 21:39

On 31 May 2011 at 11:16 Cardiff Bus Android App closed this issue.

On 31 May 2011 at 11:16 Cardiff Bus Android App commented:

Not done as a service, but unregistering the listener is not done until 5 sec after the last activity has unregistered, which seems to work nicely

Log in to post comments