2014-01-09 3 views
0

보류중인 의도로 알림을 만들고 있습니다.홈 버튼을 클릭 할 때 앱 활동 기록 지우기

Intent intent = new Intent(context, Dialog.class); 
intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); 
pIntent = PendingIntent.getActivity(context, 1, intent, 0); 

대화 상자가 열립니다. 대화 상자를 클릭하여이 대화 상자를 닫으십시오. 다음에 내가 최근 메뉴에서 app iconf를 다시 클릭하면 대화 상자 활동이 열립니다. 기본 앱 클래스를 항상 열어줬으면합니다.

어떻게해야합니까?

+0

onPause()에서 DialogActivity를 종료하십시오. – himanshurb

답변

0

AndroidManifest.xml에 android : noHistory = "true"를 설정할 수 있습니다.

<activity 
     android:name="com.example.launcher.MainActivity" 
     android:label="@string/app_name" 
     android:noHistory="true" 
/> 
관련 문제