Say if I have a locationManager(LM) object in activity A, which is my main menu. All the sub-activities need to use LM. In a good design, should I pass LM object to sub-activities? How? Please suggest some good coding pattern. Thanks.
+3
A:
You could use an Application object, that is what API proposes for those cases, when you have multiple Activities with common state.
Fernando Miguélez
2010-04-23 06:54:54
Foursquare is a good example of using the Application object: http://code.google.com/p/foursquared/
janfsd
2010-04-23 19:11:50