当我的应用程序被卸载时,包含在这个包中的一个小部件会留在 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.
已编辑:我现在正在捕捉PACKAGE_REMOVED"意图,并检查EXTRA_REPLACING"以确保它不是重新安装,但我不知道实际使用的实际代码删除小部件.
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
这篇关于卸载时从主屏幕中删除小部件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!