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..
The simplest solution is the one you rejected from the comment: remove the stock launcher and make yours be the only launcher.
Root, by itself, has nothing to do with permissions. In this case,
SET_PREFERRED_APPLICATIONSis 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.