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); 
 }

经测试,在Android4.3中使用无误(2017.02.19)

相关文章:

  • 2021-08-03
  • 2022-12-23
  • 2021-06-09
  • 2021-05-03
  • 2021-07-08
  • 2021-11-22
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2021-07-22
相关资源
相似解决方案