I have a problem, I have a main activity, which have a locationlistener, and I want to use this location info (like location.getAccuracy() or location.getAltitude()) in different activity.
What is better solution, implement new locationListener in new activity or send location using intent.putExtra ?
Asked
Active
Viewed 1,460 times
2
Krystian Bersztolc
- 204
- 2
- 3
- 16
-
3I recommend SharedPrefereces for this. – Aerrow Aug 14 '12 at 11:50
-
1Have you seen [this](http://stackoverflow.com/a/2736612/940096) – Praveenkumar Aug 14 '12 at 11:51
-
1If the `Location` class implements `Parcelable` you cut put it in the `Intent` as an extra. You should try to get locations via a `Service` though, but that's just my thought. – tolgap Aug 14 '12 at 11:53