On Thu, May 17, 2012 at 10:48 AM, Kostya Vasilyev <[email protected]> wrote: > However, I believe it's still wrong, as I see no reason for the widget > provider's onEnabled to be called each time the process is recreated (such > as by an alarm or the sticky remote views service). Unless, that is, I'm > missing something on app widget lifecycle callbacks.
Right. AFAIK, onEnabled() is only called when the first app widget from this provider is added to the home screen. onCreate() of an Application, or onUpdate() of the app widget (checking to avoid duplicate registrations) would seem to be better approaches, assuming you want to use the observer pattern at all. I'd just push the app widget updates when updating the content provider and be done with the matter. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ -- 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

