Startting and Stopping GPS from Android App (Not from single Activity ) -


i have app need current gps location 1 or many activities, in attempt reduce waiting time user, trying start gps locationlistener @ app launch. want when app exits (go home screen) of activity, gps listener should stop. having several activities , activity can use gps due app flow not sure activity user exit want maintain global state of gps start , stop. binding start , stop app start , stop.

i looking concrete solution this, pointers great..please guide!!

that doesn't sound idea. should manage gps listeners on activity level - attach them in onresume , detach in onpause. believe problem have many activities , want same stuff in every of them. create base abstract activity class manage gps connect/disconnect , extend every activity class.


Comments

Popular posts from this blog

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -