I think Android 1.5 has a bug where it does not call onDelete. If you
are running 1.5, you should implement something in your onReceive()
that is similar to this:
final String action = intent.getAction();
if (AppWidgetManager.ACTION_APPWIDGET_DELETED.equals(action)) {
final int appWidgetId =
intent.getExtras().getInt(AppWidgetManager.EXTRA_APPWIDGET_ID,
AppWidgetManager.INVALID_APPWIDGET_ID);
if (appWidgetId !=
AppWidgetManager.INVALID_APPWIDGET_ID) {
this.onDeleted(context, new int[] { appWidgetId
});
}
}
On Apr 5, 1:51 pm, Abdul Mateen <[email protected]> wrote:
> Hi,
> I have a AppWidget, after I delete it from HomeScreen it seems not stopping
> the AlarmManager attached with it. I have supported it with the AlarmManger,
> that call the ProviderImplementation class every 1 minute and in onReceive I
> put the code to call onUpdate. and in onDelete I explicitly stop the alarm,
> but it seems it is running continously and not stopping. any cure of it ?
>
> I have stopped it with cancel(pendingintent) function.
>
> thank you,
> Abdul Mateen.
--
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