如何确定一个主屏幕快捷方式存在? [英] How to determine if a home screen shortcut exists?

查看:100
本文介绍了如何确定一个主屏幕快捷方式存在?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法来确定是否一个特定的主屏​​幕快捷方式 存在?

Is there a way to determine whether a particular home screen shortcut exists?

我的应用程序安装在设备主屏幕上的快捷方式 在一定条件下的启动时间,我不想重复 出现的快捷方式。我也不想敬酒的消息显示说 创建快捷方式或快捷方式已存在每一次的 设备启动。我发现一个未公开的意图外叫 EXTRA_SHORTCUT_DUPLICATE将$由对$ pvent重复的快捷方式 正在安装,但启动还是已经显示了快捷方式 存在敬酒的消息。我宁愿不靠这个无证 意图额外如果有一个支持技术本

My application installs a shortcut on the home screen at device startup time under certain conditions and I don't want duplicate shortcuts to appear. I also don't want Toast messages appearing saying "Shortcut created" or "Shortcut already exists" every single time the device boots. I've found an undocumented Intent Extra called EXTRA_SHORTCUT_DUPLICATE which will prevent duplicate shortcuts from being installed but the Launcher still displays the "Shortcut already exists" Toast message. I'd rather not rely on this undocumented Intent Extra if there is a supported technique for this.

推荐答案

不是那种侵​​入?为什么不只是增加了一次,并让用户决定他们是否要保留与否?

isn't that kind of intrusive? Why not just add it once, and let the user decide if they want to keep it or not?

这篇关于如何确定一个主屏幕快捷方式存在?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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