Android - can I change exit buttons on Screen Pinning?

552 Views Asked by At

In 5.0 Android add Screen Pinning: https://developer.android.com/about/versions/android-5.0.html

I call in my app calling startLockTask() but for exit the app user always need to " holding both the Back and Recent buttons"

Can I change these and choose my own buttons combination?

1

There are 1 best solutions below

0
On

The API says there is a complementary stopLockTask() function so you can assign a custom button to call that. However, I don't think you can change the navigation buttons combination.

https://developer.android.com/reference/android/app/Activity.html#stopLockTask()