android exit application completely and go to main applications screen
        Posted  
        
            by 
                Totti
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Totti
        
        
        
        Published on 2012-07-04T15:05:42Z
        Indexed on 
            2012/07/04
            15:15 UTC
        
        
        Read the original article
        Hit count: 248
        
android
i know that this question is asked many times, but really i can't understand the answer, i want to set button, when user click it i want to exit the application (also the carbage collector should remove the objects), and after exiting i want to go to the screen where the user found the application icon on mobile.
for exit i don't know what to do
for going to the screen where to find the application icon i tried like this
Intent intent = new Intent(Intent.ACTION_MAIN);
            intent.addCategory(Intent.CATEGORY_HOME);
            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            startActivity(intent);
but doesn't work
© Stack Overflow or respective owner