0

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.

1 Answers1

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);