zcj0429 wrote: > Thanks, Mark. > Now the situation for me is like this: I want to create a WifiControl > class to implement scan aps/connect/disconnec,etc functions. Then I > can call these methods in other activities directly instead of Intend > because I don't want to change the view when I call the methods. So > how to solve this problem? To create a service?
How about an ordinary Java class? So long as your activities are all in one process (and they will be by default) and so long as this WifiControl class does not hold onto activities themselves (or otherwise impede their garbage collection), there's nothing to prevent multiple activities from sharing a common utility class. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Published! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

