On Wed, Jul 14, 2010 at 9:27 AM, Kostya Vasilyev <kmans...@gmail.com> 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.

On Wed, Jul 14, 2010 at 9:18 AM, TjerkW <tje...@gmail.com> wrote:
> Im calling it from the IntentService onHandleIntent method which
> should run in its own worker thread as the apidocs explain.
>
> It works on the emulator.
> However on the Nexus One i get the nullpointer exception on calling
> manager.updateAppWidget ...
> See the stacktrace in a previous post.

At this point, I am going to recommend you create a separate project,
implement a bog-simple app widget, get that working, and slowly start
introducing features until you get to your target. I have no other
advice on how to get your existing code base working. Sorry!

-- 
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

Reply via email to