Skip to content Skip to sidebar Skip to footer

Best Way To Get Home Launcher Packagename And Start It

I encountered a problem about how to get home launcher packagename. In android , there are two type of home launcher: orginal launcher 3-third launcher ,such as go-launcher or OE

Solution 1:

You can use an Intent with Category CATEGORY_HOME and Action ACTION_MAIN.

Intent startMain = new Intent(Intent.ACTION_MAIN);
startMain.addCategory(Intent.CATEGORY_HOME);
startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(startMain);

Post a Comment for "Best Way To Get Home Launcher Packagename And Start It"