Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove widget when the app is uninstalled in Android? [duplicate]

Possible Duplicate:
Removing Widget from Home Screen when Uninstalled

In Android, I have created a widget for my application. When I uninstall the app, the widget shows "problem loading widget" error in home screen. I need a scenario where widget should be removed by the developer through code (and not by the drag and drop to the trash) when I uninstall the app. Is it possible? If so, what changes we need to do? Is there anything that can be set in the manifest so that it removes all references of the app once it is uninstalled?

like image 410
Senthil Avatar asked Aug 02 '10 12:08

Senthil


1 Answers

It is not possible to get control when your app is uninstalled. I think Android 2.2 may do a better job of automatically getting rid of your app widget.

like image 77
CommonsWare Avatar answered Sep 28 '22 22:09

CommonsWare