It's obvious that the "cancel()" is working. However, the onClick is
throwing an exception because of a residue invalid PendingIntent... so
what the heck!?!? (=

Would be a lot easier to just remove the setOnClickPendingIntent
listener, but I dont see how to.


On Oct 18, 11:07 pm, Eric <[email protected]> wrote:
> Actually, in LogCat with 2.1, I get the following -
>     10-19 03:05:39.194: ERROR/RemoteViews(101): Cannot send pending
> intent:
>
> On Oct 18, 10:55 pm, Eric <[email protected]> wrote:
>
> > I'm trying to "lock out" my widgets from the onClick() pendingIntent.
> > However, I get a FC once I've activated the "lockWidgets" then the
> > lockout works OK. I only get the error in 1.6... 2.2 seems to be fine.
>
> > Am I doing the pendingIntent.cancel() correctly??
> > Thanks
> > -Eric
>
> > 10-19 02:16:23.273: ERROR/AndroidRuntime(1269):
> > android.widget.RemoteViews$ActionException: android.app.PendingIntent
> > $CanceledException
>
> > Intent intent = new Intent(context, BannerData.class);
> > intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
> > intent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK| 
> > Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS| Intent.FLAG_ACTIVITY_NEW_TASK);
> > PendingIntent pendingIntent = PendingIntent.getActivity(context,
> > appWidgetId, intent, PendingIntent.FLAG_UPDATE_CURRENT);
>
> > if(lockWidgets){
> >         if(pendingIntent != null)
> >                 pendingIntent.cancel();}else{
>
> >         remoteView.setOnClickPendingIntent(R.id.widget,
> > pendingIntent);
>
> > }

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