Removing a widget on the main screen when uninstalling

When my application is uninstalled, the widget that is contained in these packages remains in HOME and gives an error message "Problem loading widget."

How to remove a widget when my application is uninstalled? Is there an attribute in the manifest that I am missing?

I thought this thing should be handled by the OS, but suppose it is not.

EDITED : Now I catch the intention of “PACKAGE_ REMOVED” and check the “EXTRA_REPLACING” to make sure it is not reinstalling, but I don’t know which actual code to use to remove the widget.

+4
android widget
source share
1 answer

You cannot add or remove application widgets from the home screen. Only the user can do this.

Quote from @CommonsWare # 4532121

0
source share

All Articles