从主屏幕中删除小工具卸载时,小工具、屏幕

由网友(TFBOYS、我视你如命づ)分享简介:当我卸载应用程序,包含在该包小部件停留在HOME屏幕并给出了一个错误信息的问题装部件。When my application is uninstalled, a widget that is contained in this packages stays on the HOMEscreen and gives...

当我卸载应用程序,包含在该包小部件停留在HOME 屏幕并给出了一个错误信息的问题装部件。

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 :我现在是赶上了PACKAGE_删除的意图,并检查EX​​TRA_REPLACING,以确保它不是重新安装,但我不知道实际的code到使用实际删除插件。

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.

推荐答案

您不能添加或从主屏幕上删除应用程序的部件。只有用户可以做到这一点。

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

引述@CommonsWare #4532121

Quoting @CommonsWare #4532121

阅读全文

相关推荐

最新文章