现货发射集成电路中删除快捷方式指向我的应用程序 [英] Remove shortcut pointing to my app from stock launcher in ics

查看:186
本文介绍了现货发射集成电路中删除快捷方式指向我的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要删除一个特定的(更好的)或所有快捷方式(最坏情况)指向现货启动我的应用程序。我无法用UNINSTALL_SHORTCUT播出,似乎它只是不工作(呈三角问题

我的应用程序是通过体系认证证书(它将被安装在/系统/应用程序)签名,我有一些想法,如何去除快捷方式。


  1. 有没有芯片使用一个UNINSTALL_SHORTCUT工作方式?


  2. 我已经看到,股票发射器将删除指向我的应用程序,当我卸载它的所有链接。有什么办法来模拟卸载(或发送package_removed广播,具有系统权限)?也许写的包管理器的一部分吗?


  3. 如果2是不可能有什么办法可以使软件包管理器/发送PACKAGE_REMOVED广播,通过重新安装升级我的应用程序? (我可以安装/升级的应用程序默默的,因为我有INSTALL_PACKAGES权限系统权限)。



解决方案

我相信你将不得不另辟蹊径,从快捷方式除了启动您的应用程序。

不显示在应用程序的抽屉,只是删除

 <意向滤光器>
            <作用机器人:名字=android.intent.action.MAIN/>
            <类机器人:名字=android.intent.category.LAUNCHER/>
        &所述; /意图滤光器>

从活动的清单,并不会显示在快捷键

更新:你可以在不同的应用程序/ APK分开的快捷方式,当你需要的快捷方式安装快捷方式应用程序,并在不需要时卸载

I need to remove one particular (better) or all shortcuts (worst case) pointing to my app from stock launcher. I was unable to use UNINSTALL_SHORTCUT broadcast, it seems that it just dont work (simillar problem to this.

My app is signed by system certificate (it will be installed in /system/app) so I have some ideas, how to remove shortcuts.

  1. Is there a working way to use UNINSTALL_SHORTCUT in ics?

  2. I have seen that stock launcher removes all links pointing to my app when I uninstall it. Is there any way to simulate uninstalling (or send package_removed broadcast, having system privileges)? maybe write a part of package manager?

  3. If 2 is not possible is there any way I can cause package manager to send PACKAGE_REMOVED broadcast, by reinstallation/upgrading my app? (I can install/upgrade apps silently, because I have system privileges with INSTALL_PACKAGES permission).

解决方案

I believe you would have another way to start your app besides from the shortcut.

To not show on the app drawer, just remove

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

from the manifest of your Activity and it won't show the shortcut

UPDATE: you could separate the shortcuts in a different app/apk and install the shortcut "app" when you need the shortcut and uninstall when not needed.

这篇关于现货发射集成电路中删除快捷方式指向我的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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