Building a Kiosk Application in Android 5.0 (Lollipop)
Android L introduced “Screen Pinning” API. This allows an application to temporarily restrict a user from navigating away from your activity. When Screen Pinning in enabled, it restricts a user from gaining access to notification bar on top as well as the navigation bar at the bottom. Prior to Android L, developers had to hack around in order to build a kiosk type application. Those workarounds included making the application a “default launcher”, write code to forcefully close the notification bar back up so users could not gain access to them.