메인 Activity가 있고(파일을 탐색하는 activity입니다.)

 

그 activity에서 동영상 파일을 선택해서 실행하는데요.

 

그렇게 되면 제가 만든 Main activity는 OnPause()가 호출되면서 Background로 가고

 

동영상 화면이 display되는데요.

 

이 때 시간이 아무리 경과어도 제가 만든 activity를 살려둘려고 하는데요.

 

동영상이 실행된 상태에서 방치시 2시간 정도쯤되서 확인해 보니 Background로 있어야 할

 

main activity가 없어졌더라구요(OS에서 자동으로 킬했나봐요 ㅠ.ㅠ)

 

이거 계속 유지시킬 수 있는 방법이 없을까요?

 

 

동영상을 호출하는 intent는 아래와 같습니다.

      intent1 = new Intent(android.content.Intent.ACTION_VIEW);
      intent1.setDataAndType(Uri.fromFile(file),"video/*");
      intent1.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);

 

 

Main activity 속성은 아래와 같습니다. 

 <activity
            android:name=".MainScreen"
            android:label="@string/app_name"
            android:alwaysRetainTaskState="true"
            android:configChanges="keyboardHidden|orientation">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>