Question

There is a button in my app, when user clicks it, she will be leaded to the launcher interface.

I tried the following way:

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

But it goes to the "Home screen"(on the left), rather the "Launcher screen"(on the right).

I also tried Intent.CATEGORY_LAUNCHER, but it pops up a dialog for selecting an app to finish the action.

enter image description here

Was it helpful?

Solution

How to go to the launcher where all the apps are listed?

You don't, unless perhaps you are the author of the home screen in question.

As Simon indicates, there is no requirement for any home screen to allow external apps to directly go to a separate "launcher". Not every home screen even has a separate "launcher" (some blend the app widgets and launcher icons in a single display).

You are welcome to contact the authors of various home screen implementations and see if they expose some special Intent structure that would take you to the launcher.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top