android - doubt in using Location Listener -


I used the last type, to get the location of both apps on my app's start-up activity And register for a location listener for the network provider. After requesting the listener to listen for any location change, I am switching to the main activity page using startActivity. Instead of the activeity in the startup, I am trying to get place in both the listener and if any value is found then I try to store them in priority and update them both on the list and updating the place I am notified about the user.


Is this the correct way of logic coding, what is the listener listening to the location when it is no longer updated on the top of the stack, so I am using an emulator, I use GPS functionality Your suggestions on this could not be tested

Thanks

If you getLastKnownLocation () retu, only one LocationListener should not be registered Rns null, because it means that the special place Carriers as well as to convey real-time values ​​suggest caching does not sound like such a good design should I register / unregister service Listnr location / Onstop methods for each activity disabled.


Comments