So just a heads up that we won't be able to fix the onDeleted() bug
for the 1.5 SDK. Here is a quick workaround that you can patch
against your class that extends AppWidgetProvider to correctly catch
and handle the onDeleted() event.
@Override
public void onReceive(Context context, Intent intent) {
final String action = intent.getAction();
if (AppWidgetManager.ACTION_APPWIDGET_DELETED.equals(action)) {
final int appWidgetId = extras.getInt
(AppWidgetManager.EXTRA_APPWIDGET_ID,
AppWidgetManager.INVALID_APPWIDGET_ID);
if (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) {
this.onDeleted(context, new int[] { appWidgetId });
}
} else {
super.onReceive(context, intent);
}
}
j
On Apr 20, 4:43 pm, Jeff Sharkey <[email protected]> wrote:
> > In onActivityResult(), the cancellation is checked for request
> > code REQUEST_PICK_APPWIDGET whereas it should be checking
> > for REQUEST_CREATE_APPWIDGET.
>
> Oops, you're right, thanks for catching that. For the example widgets
> I've been writing that use configuration steps, I've been keeping an
> internal CONFIGURED flag which I use to skip updates. Because I was
> skipping non-configured widget updates, I never noticed this myself.
> (I also used this flag to skip the first update before the
> configuration step has been completed.)
>
> Also, a quick update on the fixes: most of them will be delayed until
> the next platform release because the device-bound code is already
> frozen. We could fix it for the SDK, but it would be bad to have
> different behavior between the two. We definitely have bugs filed for
> these, and they will be fixed.
>
> Thanks for digging in and finding them. :)
>
> --
> Jeff Sharkey
> [email protected]
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---