I have an Android Studio application that capture phone screen. With on press of a button (start capturing), I would like to hide the main screen. then when I want to finish I press the application icon and show the main screen again.
            Asked
            
        
        
            Active
            
        
            Viewed 37 times
        
    0
            
            
        - 
                    I guess you're looking for `moveTaskToBack` – Amin Dec 31 '21 at 22:00
1 Answers
0
            
            
        Press home button Going to home screen programmatically
           Intent startMain = new Intent(Intent.ACTION_MAIN);
            startMain.addCategory(Intent.CATEGORY_HOME);
            startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            startActivity(startMain);
 
    
    
        Shlomo Abuisak
        
- 113
- 9