>>>>> "MM" == Mark Murphy <[email protected]> writes:

   MM> On Wed, Feb 23, 2011 at 5:06 PM, Jake Colman <[email protected]> wrote:
   >> So although a service would work from the perspective of off-loading
   >> work from an appwidget, it's still doing it off-loaded work in the same
   >> thread?  So in what sense is it off-loaded from the appwidget?

   MM> If you don't use an IntentService, and you don't fork a thread, it's
   MM> not really "off-loaded from the appwidget" in any meaningful sense.

   >> I've converted my Service class to an IntentService,  moved all my
   >> logic into the onHandleIntent() method, and moved my state variables
   >> into the default shared preference.  All the pieces seem to be working
   >> but, much to my surprise, RemoteViews updated by the IntentService is
   >> NOT being painted on my screen!

   MM> It should be. It certainly works elsewhere.

   MM> http://developer.android.com/resources/samples/Wiktionary/index.html
   MM> 
https://github.com/commonsguy/cw-andtutorials/tree/master/25-AdvWebKit/Patchy

Is there a difference in how I find my appwidget for updating because I
switched to an IntentService?

In my onHandleIntent() method I am creating my RemoteViws object and
updating the appwidget as follows:

RemoteViews remoteViews = new RemoteViews(this.getPackageName(), 
R.layout.widget);
ComponentName thisWidget = new ComponentName(this,ZMAppWidget.class);
AppWidgetManager manager = AppWidgetManager.getInstance(this);
manager.updateAppWidget(thisWidget, remoteViews);

Any reason why this would be incorrect?

-- 
Jake Colman -- Android Tinkerer

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

Reply via email to