每次在主屏幕/午餐机上创建新的快捷方式时,我都会尝试接收一个事件。在我的应用程序接收到事件后,我喜欢修改快捷方式。下面列出了我的当前配置,但我从未收到过事件。
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT" />
<application>
<receiver
android:name=".InstallShortcutReceiver"
android:permission="com.android.launcher.permission.INSTALL_SHORTCUT">
<intent-filter>
<action android:name="com.android.launcher.action.INSTALL_SHORTCUT" />
</intent-filter>
</receiver>
</application>我的主意有可能吗?
致以最良好的问候,安德烈
发布于 2015-07-20 13:55:18
我找到了。使用悬垂和从菜单中删除创建我的快捷方式时,不会发布任何INSTALL_SHORTCUT事件。
发布于 2015-07-19 20:53:40
如果从接收方删除权限行,会发生什么情况?您在接收器中指定的权限是调用它所需的权限,而不是接收广播所需的权限。
https://stackoverflow.com/questions/31505672
复制相似问题