I would like to know what is the best way of saving the latitude and longitude from the onLocationChanged()
method.
Is it by using SharedPreferences, or an I*ntent/BroadcastReceiver*?
Thanks.
I would like to know what is the best way of saving the latitude and longitude from the onLocationChanged()
method.
Is it by using SharedPreferences, or an I*ntent/BroadcastReceiver*?
Thanks.
I would just store it in a public static
(class) variable so that all of your activities can access it. I think SharedPreferences is overkill (unless this value needs to survive when your application is killed and later restarted).