최근 사용한 앱에서 제외.
1. AndroidManifest 선언 방법
- 제외시키고자 하는 Activity의 Property로
android:excludeFromRecents="true"
한줄 추가 하면 됩니다.
예제입니다.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
....
<application
....
<activity
android:label="@string/app_name"
android:excludeFromRecents="true"
>
2. Intent에 Flag 사용 하는 방법
- Intent에 Flag를 추가해주면 됩니다. .
예제입니다.
Intent mIntent = new Intent(this, MainActivity.class);
mIntent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
'Dev_안드로이드 > 참고소스' 카테고리의 다른 글
가로세로 고정하기 (0) | 2016.08.30 |
---|---|
전화번호부에 저장된 이름 가져오기 (0) | 2016.08.29 |
폰전화번호 가져오기 (0) | 2016.08.22 |
안드로이드 앱 개발 할 때 무선 WIFI로 디버깅 하는 방법 (0) | 2016.08.11 |
[Button] 버튼 텍스트가 자동으로 대문자로 보일 때 (0) | 2016.08.10 |