• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Forcing Widget Update After Configuration Activity

Blrfl

Well-Known Member
This drew a big goose egg over on Stack Overflow (CLICKY), so I thought I'd give it a whirl here:

I'm writing a widget with a configuration activity that needs to force an update after the activity is complete. The activity has a button whose ClickListener that calls this:

Code:
// ...Store Widget Configuration...

// Force an update  (Pretty much verbatim from the documentation)
Context context = getApplicationContext();
RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget);
AppWidgetManager.getInstance(context).updateAppWidget(widget_id, views);

// Return the expected result
Intent result = new Intent();
result.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, widget_id);
setResult(RESULT_OK, result);

finish();
The widget class gets all of the calls I'd expect except the forced update.

Any ideas on why this doesn't work? More details are in the posting at SO.

Thanks.

--Mark
 
Back
Top Bottom