gps - Getting Location in Android for different activities -


i developing app wich uses gps in many activities. @ first thought of implementing locationlistener in each activity. wonder if possible better aproach problem having service gps. think right path follow?

thanks lot. d.

you can create base activity class implements locationlistener interface, , have location-aware activities subclass base activity. since only 1 activity active , in foreground @ time, there's no waste of resources here. (assuming register in onresume, , call removeupdates in onpause instance)


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -