1

I am trying to create a kiosk type app so when you press the recent apps button I dont want the user to be able to go to a different app. I have been googling around but cannot find anything on this matter. There is this solution in this thread Recent apps button in android

However this does not seem to work for me on Android 6.0

Can someone please point me to the right direction on how to do this? Thanks

Community
  • 1
  • 1
user1281566
  • 133
  • 1
  • 3
  • 15
  • I again say it is not possible to intercept that button directly but you can do some workaround for it, one is mentioned in the answers [here](http://stackoverflow.com/questions/17769367/android-intercept-recent-apps-button), I hope it will help! – Masked Man Nov 08 '16 at 07:13

3 Answers3

1

In the link you provided yourself can find the answer:

Is that possible to override recent apps button in android? Not from an ordinary SDK app.

You are welcome to build your own custom ROM that modifies the overview screen, then convince people to install your custom ROM on their devices.

So your answer is no in the app written by Google provided SDKs.

Masked Man
  • 2,176
  • 2
  • 22
  • 41
  • There are apps in the Play Store such as Mobilock that are able to do this. I have Nexus 5x and Im on the latest Android version and Mobilock works fine on that. When you press the recent apps button, recent apps will appear for a brief moment and the app will switch back to the default app you have allowed to run. – user1281566 Nov 07 '16 at 19:54
1

It is not possible. You can not control recent app AND home button in Android. You can't allow user to not leave the app. It is user's choice.

Edit: The only way you will be able to control those buttons is if you have system level permissions. To have system level permission for the device, you have to have system certificates and you won't have that unless you created the Android ROM on the device.

ᴛʜᴇᴘᴀᴛᴇʟ
  • 4,466
  • 5
  • 39
  • 73
0

there's a app called "All in one Gestures" that can make the physical recent apps button without blocking some alternate way to trigger recent apps (like assistant menu in accessibility settings), i'm not the developer of that app but using APK editor, i see that the app are using accessibility service

Stvk
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 24 '23 at 07:21