I ran “Main” when i click button “exit”
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_HOME);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
and then i return on my application and see… it’s not first “activity”.. this is my last “activity”
how can I set the program … begin with the first activity?
Only when I click “exit”
i have:
[1] activity [2] activity [3] [4]
when i pressed “exit” in [4] or [3] activity i go “Main” and then if i start or return app i again create [1] activity
if i “turn back” or pressed button “down button” and return app i start “onResume()” when i pressed this buttons
in first activity (major activity)
and button “exit” add next code