I am trying to launch the home screen from a service.. I used the following code
Intent startMain = new Intent(Intent.ACTION_MAIN);
startMain.addCategory(Intent.CATEGORY_LAUNCHER);
startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(startMain);
It is working fine in Android 2.3, but not in 4.0
In 4.0 its showing a list to choose what should be a default screen.
I need the same effect as we can get in 2.3
Thanks in advance
Can you try this add see if it works.
instead of this Category, startMain.addCategory(Intent.CATEGORY_LAUNCHER);
try this,
startMain.addCategory(Intent.CATEGORY_HOME);