Hi All,
I have AppWidget which runs fine but I want to do some cleanup task
when last appwidget is deleted. So according to android documents, I
implemented onDisabled() method in my AppWidgetProvider class.But when
i delete the last AppWidget, onDisabled is not getting called.
When I implemented onDeleted() method, It gets called. I checked all
instance of my appwidgets using following code,
AppWidgetManager
appWidgetManager=AppWidgetManager.getInstance(context);
int[] allAppWidgets=appWidgetManager.getAppWidgetIds(new
ComponentName(context,MyWidgetProvider.class));
for(int i=0;i<allAppWidgets.length;i++)
System.out.println("AppWidget==>"+appWidgetManager.getAppWidgetInfo(allAppWidgets[i]).toString());
It shows that it has got 11 instances of appwidget. But i cannot see
any instance of my appwidget except the one which i create.
Does anyone knows how to delete all the instances of this invisible
AppWidgets?
Regards,
Mahavir
--
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