从主屏幕中删除小工具卸载时, [英] Removing Widget from Home Screen when Uninstalled

查看:154
本文介绍了从主屏幕中删除小工具卸载时,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我卸载应用程序,包含在该包小部件停留在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 <一href="http://stackoverflow.com/questions/4532121/removing-appwidgets-programmatically">#4532121

Quoting @CommonsWare #4532121

这篇关于从主屏幕中删除小工具卸载时,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆