Right, actual views "live" in a separate process altogether and
RemoteViews is marshalled to this process... That's understood.
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?
-- Kostya
14.07.2010 17:41, Mark Murphy пишет:
On Wed, Jul 14, 2010 at 9:27 AM, Kostya Vasilyev<[email protected]> wrote:
> AFAIK, all UI methods are supposed to be called from the UI thread, are
> widget calls an exception to this rule?
An app widget has nothing to do with the UI...from your application's
standpoint.
The home screen probably has to apply the RemoteViews commands on its
main application thread. When you call updateAppWidget(), all you are
doing is passing a data structure to the home screen application via
IPC, and that can happen from any thread you like.
--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com
--
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