4

When my application is uninstalled, a widget that is contained in this packages stays on the HOME screen and gives an error message "problem loading widget".

How do I remove the 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 guess it is not.

EDITED: I am now catching the "PACKAGE_ REMOVED" intent, and checking the "EXTRA_REPLACING" to make sure it's not a reinstall, but I don't know the actual code to use to actually remove the widget.

Janusz
  • 187,060
  • 113
  • 301
  • 369
Ryan Alford
  • 7,514
  • 6
  • 42
  • 56
  • 1
    I'm not sure this is possible - can you ever remove anything off of the Home screen? The Home screen is another app, and I don't think it advertises its content through a Provider or anything like that. – Eric Mill Dec 08 '09 at 04:45
  • No idea about removing anything from the HOME screen. I am just amazed that the OS doesn't handle this. – Ryan Alford Dec 08 '09 at 12:59

1 Answers1

0

You cannot add or remove app widgets from the home screen. Only the user can do that.

Quoting @CommonsWare #4532121

Community
  • 1
  • 1
Blundell
  • 75,855
  • 30
  • 208
  • 233