출처 : http://stackoverflow.com/questions/30979005/block-disable-recent-apps-button#31649689




Step 1

Add this permission to the manifest.xml file

 

<uses-permission android:name="android.permission.REORDER_TASKS" />

 

Step 2

Put this code in any Activity on which you want to block/disable the recent apps button

 @Override

 protected void onPause() {

        super.onPause();

 

        ActivityManager activityManager = (ActivityManager) getApplicationContext()

                .getSystemService(Context.ACTIVITY_SERVICE);

 

        activityManager.moveTaskToFront(getTaskId(), 0);

}

I have tried in several devices and it is working perfectly. Pressing the recent apps button may turn the screen black for less than a second but will bring your activity back again.

 


일단 앱 선택 창으로 넘어가진 않는다.


하지만 처음 키를 누르면 깜빡임이 있다.


이걸 막는 것도 찾아봐야 할 것 같다.


Posted by motolies
,