An api to make an app running in kiosk-mode. Available since api level 21 : Android-5.0-Lollipop
The Screen Pinning API is presented here. It is available since API level 21 (Lollipop) and mainly contains 2 methods to enter and exit the screen-pinning-mode:
When an app is in screen-pinning-mode : all usual methods to navigate between apps are blocked. For instance the "Home" and "Recent Apps" buttons are not active. (more details here)
In general, activating screen-pinning-mode requires user confirmation. One exception to this rule: the current device owner app have the ability the grant "the right to enter screen-pinning-mode without user approval" by calling DevicePolicyManager.setLockTaskPackages