플래그를 하나하나 전부 적용시켜 봤는데, 잘 안되는 것 같네요.


Task 간에 스위칭 되는 (HOME 을 롱클릭 했을 떄 나오는 화면의 동작과 같음) 어플을 만들어보려고 하는데요,


recentTaskInfo 에서 componentName 을 받아와서 


intent.setClassName(cn.getPackageName(), cn.getClassName())


후, startActivity(intent) 를 호출하면


해당 Activity 로 전환은 잘 되는데... Activity 가 재시작 되어 버립니다.


(만약 뉴스 앱이라면, 뉴스 초기화면으로 돌아가버립니다.)


이런 경우 어떻게 처리를 해야, 마지막 상태부터 그대로 Task 를 실행시킬 수 있을지요?


(API 문서에는 FLAG_ACTIVITY_NEW_TASK

Start the activity in a new task. If a task is already running for the activity you are now starting, that task is brought to the foreground with its last state restored and the activity receives the new intent in onNewIntent().

This produces the same behavior as the "singleTask" launchMode value, discussed in the previous section. 라고 쓰여 있는 것으로 보아, 이 플래그를 사용하면 Task 가 실행중이라면 마지막 실행 상태를 다시 로그해서 시작되어 하는데, 왜 처음부터 재시작이 될까요?)