[android-developers] WidgetProvider onUpdate called while there is no widget displayed
Hi folks, This post is a similar to a Stackoverflow question [1], where I didn't get any response, sorry for the duplicate. I wrote a widget with a configuration Activity, and each time I install the application with adb, the onUpdate method of my WidgetProvider is called even if the widget isn't displayed. And also sometimes with multiple appWidgetIds, and also when the configuration Activity is started. In the onUpdate method I checked the value of appWidgetManager.getAppWidgetIds(), and it returns 0 items. I don't understand because I though : 1. An AppWidgetProvider receives the broadcast only when there is one ore more widget displayed. 2. A widget with a configuration Activity isn't updated with the broadcast on start up. 3. Calling appWidgetManager.getAppWidgetIds() in onUpdate should returns the same int array than the appWidgetIds in the parameters. As I experiment all those 3 dots are false. Thanks in advance for explanation/help --Tom [1] http://stackoverflow.com/questions/5395635/widget-receives-broadcast-while-there-is-no-widget-displayed -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] WidgetProvider onUpdate called while there is no widget displayed
Yes, this is how it works now. The documentation is wrong / obsolete. -- Kostya 24.03.2011 18:25, Tom ?: Hi folks, This post is a similar to a Stackoverflow question [1], where I didn't get any response, sorry for the duplicate. I wrote a widget with a configuration Activity, and each time I install the application with adb, the onUpdate method of my WidgetProvider is called even if the widget isn't displayed. And also sometimes with multiple appWidgetIds, and also when the configuration Activity is started. In the |onUpdate| method I checked the value of |appWidgetManager.getAppWidgetIds()|, and it returns 0 items. I don't understand because I though : 1. An |AppWidgetProvider| receives the broadcast only when there is one ore more widget displayed. 2. A widget with a configuration |Activity| isn't updated with the broadcast on start up. 3. Calling |appWidgetManager.getAppWidgetIds()| in |onUpdate| should returns the same int array than the |appWidgetIds| in the parameters. As I experiment all those 3 dots are false. Thanks in advance for explanation/help --Tom [1] http://stackoverflow.com/questions/5395635/widget-receives-broadcast-while-there-is-no-widget-displayed -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] WidgetProvider onUpdate called while there is no widget displayed
Are you serious ? since what version it changed ? Is there a way to understand how it works now ? 2011/3/24 Kostya Vasilyev kmans...@gmail.com Yes, this is how it works now. The documentation is wrong / obsolete. -- Kostya 24.03.2011 18:25, Tom пишет: Hi folks, This post is a similar to a Stackoverflow question [1], where I didn't get any response, sorry for the duplicate. I wrote a widget with a configuration Activity, and each time I install the application with adb, the onUpdate method of my WidgetProvider is called even if the widget isn't displayed. And also sometimes with multiple appWidgetIds, and also when the configuration Activity is started. In the onUpdate method I checked the value of appWidgetManager.getAppWidgetIds(), and it returns 0 items. I don't understand because I though : 1. An AppWidgetProvider receives the broadcast only when there is one ore more widget displayed. 2. A widget with a configuration Activity isn't updated with the broadcast on start up. 3. Calling appWidgetManager.getAppWidgetIds() in onUpdate should returns the same int array than the appWidgetIds in the parameters. As I experiment all those 3 dots are false. Thanks in advance for explanation/help --Tom [1] http://stackoverflow.com/questions/5395635/widget-receives-broadcast-while-there-is-no-widget-displayed -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- --Tom -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] WidgetProvider onUpdate called while there is no widget displayed
24.03.2011 18:41, Thomas Bruyelle пишет: Are you serious ? Yes. since what version it changed ? No idea. Is there a way to understand how it works now ? There is. LD - Logging and Debugging. -- Kostya Vasilyev -- 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] WidgetProvider onUpdate called while there is no widget displayed
Ok thanks Kostya, I hope the doc will be updated soon. LD is not my preferred way ! --Tom -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] WidgetProvider onUpdate called while there is no widget displayed
24.03.2011 20:29, Thomas Bruyelle пишет: Ok thanks Kostya, I hope the doc will be updated soon. As for updating - the docs still have widget size suggestions that only work for MDPI (1.5) devices. But - hope springs eternal :) LD is not my preferred way ! As long as it's not SM Although sometimes it seems that way :) --Tom -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en