Obsolete
Status Update
Comments
ms...@gmail.com <ms...@gmail.com> #2
Just spent half a day figuring out what was going wrong with my widget updates, until I found this. Thank God. I can confirm this problem.
gu...@gmail.com <gu...@gmail.com> #3
I too spend an entire day working with the emulator trying to get my App Widget to update to no avail, until I found this. I can confirm this bug, please fix! It makes developing App Widget very difficult.
ge...@gmail.com <ge...@gmail.com> #4
Same here. I spent close to 2 days on this. Same problem on 2.3 2.2 and 2.1-update1. However, I have a quicker workaround, Try CTRL-F11 or CTRL-F11 to change to landscape mode and back. It seems to force the internal "refresh" of the view.
la...@gmail.com <la...@gmail.com> #5
I encounter the same problem.
CTRL-F11 can work around.
Thanks.
CTRL-F11 can work around.
Thanks.
pa...@gmail.com <pa...@gmail.com> #6
Same problem here. I'm using 2.1-update-1.
sa...@gmail.com <sa...@gmail.com> #7
Perhaps to add more specifics, I'll layout the scenario I'm encountering with this very same issue, in a 2.1 Update 1 emulator instance, that's been data-wiped:
1.) OnEnabled() fires on my widget. I have this set to trigger a long-running service (with a callback to my AppWidgetProvider for view updates) to retrieve some web service data, and save it in SharedPreferences (which will then be read by the appwidget onUpdate calls).
2.) OnUpdate() fires on my widget, and sets a default layout on my appwidget.
3.) My configuration activity fires. This activity is set to manually trigger an update on the appwidget, when the user hits the "Submit" button.
4.) The callback intent from my service is returned to the AppWidgetProvider. This intent triggers an update on the appwidget as well.
If I hit the Submit button on my configuration activity quickly (while my service is still running) that's when I see the symptoms described by this issue. Three appwidget updates are ultimately fired: the initial onUpdate() call which sets the default layout, the update that results from my service call, and the update that results from my configuration activity.
I can confirm that the latter two updates have access to the data from the web service call. But even though I'm updating the TextViews in my RemoteViews WITH that data, my widget CONTINUES to display the default text from the initial onUpdate call. Changing from portrait to landscape mode in the emulator seems to evoke the redraw that I need.
1.) OnEnabled() fires on my widget. I have this set to trigger a long-running service (with a callback to my AppWidgetProvider for view updates) to retrieve some web service data, and save it in SharedPreferences (which will then be read by the appwidget onUpdate calls).
2.) OnUpdate() fires on my widget, and sets a default layout on my appwidget.
3.) My configuration activity fires. This activity is set to manually trigger an update on the appwidget, when the user hits the "Submit" button.
4.) The callback intent from my service is returned to the AppWidgetProvider. This intent triggers an update on the appwidget as well.
If I hit the Submit button on my configuration activity quickly (while my service is still running) that's when I see the symptoms described by this issue. Three appwidget updates are ultimately fired: the initial onUpdate() call which sets the default layout, the update that results from my service call, and the update that results from my configuration activity.
I can confirm that the latter two updates have access to the data from the web service call. But even though I'm updating the TextViews in my RemoteViews WITH that data, my widget CONTINUES to display the default text from the initial onUpdate call. Changing from portrait to landscape mode in the emulator seems to evoke the redraw that I need.
pu...@gmail.com <pu...@gmail.com> #8
This is really a strange problem, and in my case, it's not only found in emulator, sometimes the UI update is not applied in my real device, when the widgets is not visible, some updates will not take effect.
bi...@gmail.com <bi...@gmail.com> #9
I'm seeing the same problem on a Sprint HTC Hero with 2.1 Update 1. It is a refurbished unit purchased on e-bay, but it was freshly wiped just before installing the widget.
pu...@gmail.com <pu...@gmail.com> #10
Oh, in my case I found the reason is that the launcher stopListening to the widget when onStop, so when the homescreen is invisble, the UI update will not take effect, what we should do is update the UI as a whole everytime to avoid this.
as...@gmail.com <as...@gmail.com> #11
6 hours I spent on this issue till I read this post
up...@gmail.com <up...@gmail.com> #12
This seams to be the list of desperate.
I solved the problem by changing orientation of emulator to landscape and back.
After that it worked, I didn't have to change orientation for every refresh.
I solved the problem by changing orientation of emulator to landscape and back.
After that it worked, I didn't have to change orientation for every refresh.
ra...@gmail.com <ra...@gmail.com> #13
I concur with the above and I have experienced the same problem. The CTRL+F11 workaround worked for me too. I found this after about two hours wasted thinking it was my code. It doesn't help that the API docs for updateAppWidget() state that the "RemoteViews parameter will be cached by the AppWidgetService"...
im...@gmail.com <im...@gmail.com> #14
Same problem for me, thinking the problem was my code (this is my first app for autolearning). Problem resolved after relaunch without wiping...
bo...@gmail.com <bo...@gmail.com> #15
blargifargh. wasted a whole bunch of hours on this too... restart of AVD worked for me. CTRL F11 didn't work.
va...@gmail.com <va...@gmail.com> #16
Well, I'm also one with the widget update problem. Several hours of tweaking my code, then found this issue. Hope it will work normally on a real device ;-)
Description
appWidgetManager.updateAppWidget calls are not updating the respective
widgets. Intents are properly received, the calls are called normally, yet
no widget updates occur.
If you restart the AVD (with or without the widget's package installed on
the device) the problem cease to exist after the first non freshly
initialized boot.
The issue seems to exist on 2.0 and 2.1, on 1.5, 1.6 and 2.2 it is behaving
as expected.
Sample code is attached to reproduce the problem (a minimalistic
AppWidgetProvider listening to android.intent.action.TIME_SET to be able to
manually force updates).