There are two issues here.

One is, what happens to widgets when the application package is updated (during development or via a Market update).

The way it's supposed to work is that all widgets get a chance to update via onUpdate. In practice, I've seen onUpdate get called, but the widget not reflecting the update, and stopping to function (not responding to clicks, the UI getting reset, etc.) on one device from a major company, out of the three I have.

So for updates - there no need to instruct the users to always recreate your widgets, but it can be necessary on some devices.

Two is debugging. I haven't seen this - but I'd check the DDMS perspective to make sure that the process actually connects to the Eclipse debugger (there is a bright green "bug" icon next to the process).

Other than that, widgets are broadcast receivers, and as such, give you a very short time window once you've hit a breakpoint. If you spend more than a few seconds on a breakpoint that is triggered by onReceive, the process will get killed by Android, and lose the debugger connection.

-- Kostya

09.07.2011 11:19, Davy пишет:
Hi,

I have an application that includes a couple of widgets.
During development, I place the widgets on the homescreen of the emulator and start developing.

When I'm working in Eclipse, and I'm pushing a new version of my app to the emulator, I sometimes have the impression that the widgets are becoming "stale". Breakpoints that were on the widgets code don't appear to be active anymore (don't have the "v" marker), and the debugger doesn't suspend on them. When I remove the widget and I place it on the homescreen again, the breakpoint becomes active and the debugger starts suspending again.

Is that something you need to take into account when developing widgets ? Also, when I push a new version of my app on the market, and my users already had the widgets on the homescreen, are they advised to "refresh" them by removing / adding them again ?

Regards,
Davy
--
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

--
Kostya Vasilyev

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