On Sat, Aug 20, 2011 at 7:15 AM, Ash <[email protected]> wrote: > My question is how can use myObserver class to update the button in > 'myActivity'.
Step #1: have MyObserver hold onto an instance of MyActivity Step #2: have MyObserver call methods on the MyActivity instance > The function 'onConnect' and 'onDisconnect' can be called at any time and I > don't wish to implement polling (or timer) to check for variable status. If there are concerns about those methods being called on background threads, use runOnUiThread on MyActivity to force the UI update work to be done on the main application thread. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.6 Available! -- 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

