Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion AppWidget issues
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jeff Sharkey  
View profile  
 More options Apr 23 2009, 2:02 pm
From: Jeff Sharkey <Jeffrey.Shar...@gmail.com>
Date: Thu, 23 Apr 2009 11:02:02 -0700 (PDT)
Local: Thurs, Apr 23 2009 2:02 pm
Subject: Re: AppWidget issues
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 <jshar...@android.com> 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
> jshar...@google.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.