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