如何设置我的应用程序默认情况下,植根设备我的、应用程序、如何设置、情况下

由网友(乱7.八糟)分享简介:我们有一个平板电脑应用程序,我们正在部署零售网点。目前,它自晚更新在夜间,但它确实后它不再是默认的家的应用和向用户给出选择再次开始我们的应用程序或缺省启动程序。我们希望始终有我们的应用程序是,即使更新默认主页的应用程序。有没有办法做到这一点有根的设备上?这是一种基于ICS的设备所以加preferredActivity似...

我们有一个平板电脑应用程序,我们正在部署零售网点。目前,它自晚更新在夜间,但它确实后它不再是默认的家的应用和向用户给出选择再次开始我们的应用程序或缺省启动程序。我们希望始终有我们的应用程序是,即使更新默认主页的应用程序。有没有办法做到这一点有根的设备上?

这是一种基于ICS的设备所以加preferredActivity似乎不工作,我不能让即使该设备是植根于android.permission.SET_ preFERRED_APPLICATIONS许可。如果有办法解决,我想我可以完成这件事。

解决方案   

有没有办法做到这一点有根的设备上?

最简单的办法是从注释拒绝一:删除股票发​​射器,使你是唯一的启动

。   vivo手机更新软件 告诉我应用程序未安装 1000000 是什么情况

这是一种基于ICS的设备所以加preferredActivity似乎不工作,我不能让即使该设备是植根于android.permission.SET_ preFERRED_APPLICATIONS权限。

根,其本身无关,与权限。在这种情况下, SET_ preFERRED_APPLICATIONS 是签名级别的权限,这意味着您的应用程序必须由同一个签名密钥的固件签署,这将不除非你滚你自己改装成光盘成为可能。

如果我读the Android源$ C ​​$ C 正确,的结果添加preferredActivity()风在 /数据/系统/包的.xml ,在< preferred-活动> 元素。玩弄修改该文件的非常仔细地,然后看看是否你想要什么就会得到你。

We have a tablet app that we're deploying at retail outlets. It currently self updates late at night but after it does it is no longer the default "home" application and the user is given the choice to start our app or the default launcher again. We'd like to always have our app be the default home application even after updates. Is there a way to do this on a rooted device?

This is an ICS based device so the addPreferredActivity doesn't seem to work as I cannot get the android.permission.SET_PREFERRED_APPLICATIONS permission even though the device is rooted. If there is a way around that, I think I could get this done..

解决方案

Is there a way to do this on a rooted device?

The simplest solution is the one you rejected from the comment: remove the stock launcher and make yours be the only launcher.

This is an ICS based device so the addPreferredActivity doesn't seem to work as I cannot get the android.permission.SET_PREFERRED_APPLICATIONS permission even though the device is rooted.

Root, by itself, has nothing to do with permissions. In this case, SET_PREFERRED_APPLICATIONS is a signature-level permission, meaning that your app would have to be signed by the same signing key as the firmware, which will not be possible unless you roll your own modded ROM.

If I am reading the Android source code correctly, the results of addPreferredActivity() wind up in /data/system/packages.xml, in a <preferred-activities> element. Play around with modifying that file very carefully and see if that will get you what you want.

阅读全文

相关推荐

最新文章