Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Launch Home Screen Programmatically in Android [duplicate]

Tags:

I want to launch home screen of Android with my application. The main target is to show all of apps to user when he/she presses a specialized key. Actually, the way is not important. Any idea to do this?

like image 778
sjor Avatar asked Jan 21 '11 08:01

sjor


1 Answers

Here is the code for starting HomeActivity

        Intent startMain = new Intent(Intent.ACTION_MAIN);         startMain.addCategory(Intent.CATEGORY_HOME);         startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);         startActivity(startMain); 
like image 97
Anand Avatar answered Sep 27 '22 17:09

Anand