19.09.2010 6:08, Chris пишет:
   I'm having an issue with a config activity for a widget.  According
to the dev docs, if I specify a configuration activity than the
onUpdate method of the AppWidgetProvider doesn't get called until
after you request an update once you've completed the configuration
activity.  For me its happening in reverse, the onUpdate method of the
AppWidgetProvider gets called first, followed by the configuration
activity.  Then the onUpdate method is never called after completion
of the config activity even though I request it explicitly.  I tried
with level 4 and level 7 API, same result.  Here is some of the
source:
onUpdate getting called before the config activity is done is normal (i.e. Android does things this way, not sure it's a good thing, but it's not something specific to your code), the widget is hidden at this point.

Not sure what you mean by "requesting" an update - what config activity is supposed to do is build a RemoteViews object and push it "manually" to the widget using appWidgetManager.updateAppWidget(<widget id>, <remote views>);

Using a config activity can result in some issues with stale widget ids (if the user cancels). I've documented my experiences with it here:

http://kmansoft.wordpress.com/2010/06/22/per-widget-options-stale-widgets/

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

Reply via email to