Mark Murphy wrote: > skink wrote: > > hi, > > > > my custom AppWidgetProvider has onUpdate method where i have logic to > > update RemoteViews > > > > it is not periodically updated by system, but rather, i'd like to > > trigger onUpdate if something happens (in one of my app Activities). > > both custom AppWidgetProvider and Activities i'd like to trigger > > update from run with the same UID > > > > i tried some AppWidgetManager's methods, but no luck, finally i ended > > with really weird solution: i'm sending broadcast with action > > ACTION_APPWIDGET_UPDATE and extras EXTRA_APPWIDGET_IDS which i got > > from AppWidgetManager > > > > is it a common way of updating AppWidgetProvider? > > You could also just send a broadcast to the provider directly, via the > component-name version of the Intent constructor. Look for a null > action, or some extra you package in, or something to tell it is your > own custom Intent, then do the update work. >
thank you Mark, this is exactly what i'm doing now - sending broadcast directly to my AppWidgetProvider by manually creating proper Intent and adding some EXTRA_APPWIDGET_IDS extras yet my impression was that this is not the way one should do: i mean i thought there must be some higher level helper method to update AppWidgetProvider pskink -- 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

