I want to prevent to launch google if user long press home button.
How to disable this google launcher?
I want to prevent to launch google if user long press home button.
How to disable this google launcher?
ActivityManager activityManager = (ActivityManager) getApplicationContext().getSystemService(Context.ACTIVITY_SERVICE);
activityManager.moveTaskToFront(getTaskId(), ActivityManager.MOVE_TASK_NO_USER_ACTION);
This will not disable Home button long press but, will keep your task front always so, even you open any other app from your application it will be in background. this need permission android.permission.REORDER_TASKS