CopyPastor

Detecting plagiarism made easy.

Score: 1.7726890355842548; Reported for: String similarity, Exact paragraph match Open both answers

Possible Plagiarism

Plagiarized on 2012-04-14
by Shankar Agarwal

Original Post

Original - Posted on 2010-09-16
by Janusz



            
Present in both answers; Present only in the new answer; Present only in the old answer;

You can do this through an [Intent][1].
Intent startMain = new Intent(Intent.ACTION_MAIN); startMain.addCategory(Intent.CATEGORY_HOME); startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(startMain);
This Intent will start the launcher application that the user has defined. Be careful with this because this will look like your application crashed if the user does not expect this.

[1]: http://developer.android.com/reference/android/content/Intent.html
You can do this through an [Intent][1].
Intent startMain = new Intent(Intent.ACTION_MAIN); startMain.addCategory(Intent.CATEGORY_HOME); startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(startMain);
This Intent will start the launcher application that the user has defined. Be careful with this because this will look like your application crashed if the user does not expect this.
If you want this to build an exit button from your app please read this article on [exit Buttons][2] in Android

[1]: http://developer.android.com/reference/android/content/Intent.html [2]: http://blog.radioactiveyak.com/2010/05/when-to-include-exit-button-in-android.html

        
Present in both answers; Present only in the new answer; Present only in the old answer;