I am working on a kiosk mode application,wherein I want my app to work as the default launcher,instead of the android launcher.On device reboot my app should pop up as the default launcher.For the same,I have created an app to act as a launcher for a kiosk mode application running on an android tablet namely iBall 3G7171 HD7(4.2.2).In the manifest I have given the relevant permissions as follows.
<action android:name="android.intent.action.MAIN" />
<!-- The following two intent-filters are the key to set homescreen -->
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
While I run this code on my samsung s2, on reboot this app is launched as the launcher app and works as expected.However,when I run it on my tablet I see that the app is not launched as the launcher app on device reboot,instead its the default android launcher that pops up.
What I tried : I listened to the BOOT COMPLETE intent to launch my launcher app.But the problem here is that the BOOT COMPLETE intent is fired after about 5 seconds,during which the default android launcher shows up,post which my launcher app is called.I do not want it to work this way,hence the approach of listening to boot complete broadcast won't work for my case.
What I want : Is to launch my launcher app immediately when my device reboots.
What is it that I am missing/doing wrong in my current code.Any help would be appreciated.Many thanks !
If you are ok using adb shell command, then