I am using alarm in my application in which I had added snooze functionality. I want that, when I press snooze button, then I should go to home screen but not getting how to do this.
use any of the next commands, depending on your requirements:
start the launcher app:
code:
Intent startMain = new Intent(Intent.ACTION_MAIN);
startMain.addCategory(Intent.CATEGORY_HOME);
startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(startMain);