On Wed, Jul 14, 2010 at 10:04 AM, Kostya Vasilyev <kmans...@gmail.com> wrote: > But an AppWidgetProvider is a broadcast receiver, and its methods are called > on a certain thread within the containing process. Is it safe to call > updateAppWidget and other methods (such as getAppWidgetIds) from a > different, arbitrary thread? > > Or, this can be restated as: is AppWidgetManager thread-safe? > > If so, is this by design, or is it not guaranteed and happens to work in > some configurations and not in others?
AppWidgetManager is merely a wrapper around an IPC call, if you look at the source code, and similar constructs elsewhere in Android (most *Manager classes) work fine from background threads. So, AFAICT, it should be fine from a background thread. That being said, I am not a Googler (nor do I play one on TV)... -- 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 *Advanced* Android Development_ Version 1.9 Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en