Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any way to disable/override the mutitask button on Galaxy Tab 4? [duplicate]

We have an industrial control app we write and ship pre-loaded on Samsung Galaxy Tablets with our manufacturing products.

The tablets we were using were Tab 10's which ran Honeycomb, but we can't get enough of those to OEM anymore so we're switching to Tab 4's which run KitKat. The new tablets have a button which looks like the old menu button - two overlapping rectangles - but it's different functionality - it's called the "multi-task" button and it brings up a task-switcher/task-killer.

We'd like to programmatically disable that or override it with different behavior. How do we do that? Is this a feature of KitKat, or is it a Samsung customization that we can't get programmatic access to?

like image 883
user316117 Avatar asked Nov 01 '22 10:11

user316117


2 Answers

This code works for me. Actually, you cannot disable task button. When you press it, your activity calls onPause() method and you can move your task to the front in this method. See my answer for related question.

@Override
protected void onUserLeaveHint() {
    super.onUserLeaveHint();
    ((ActivityManager) getApplicationContext().getSystemService(Context.ACTIVITY_SERVICE)).moveTaskToFront(getTaskId(), 0);
}

@Override
protected void onPause() {
    super.onPause();
    ((ActivityManager) getApplicationContext().getSystemService(Context.ACTIVITY_SERVICE)).moveTaskToFront(getTaskId(), 0);
}
like image 126
kagkar Avatar answered Nov 11 '22 12:11

kagkar


As far as I know -- no, you are not allowed to override system controls from an app.

You can probably achieve this with a ROM mod though. : )

Here are a few related links:

Android Override multitasking-key

How to ignore button click of “Recent Activity Button” in android 3.0

like image 43
Sipty Avatar answered Nov 11 '22 12:11

Sipty