How to nable kiosk mode in custom Android app

in #sthink6 years ago

I am creating an Android app using Xamarin's latest version in Visual Studio using C#. I am able to get most of the things done as desired but one requirement we have is that the app should run in a kiosk mode.

The functionality expected is that once the app has started if someone tries to swipe form top or any other way tries to get out of the app, it will ask for a pin and if no pin is entered (or wrong pin is entered) then in 5 seconds the app reverts back to the main app screen. This is important because the tablet that runs our app is going to be placed in a public place and we don’t want anyone to mess around with the tablet by getting out of the app.

I have seen lot of apps on Android that have kiosk mode but I don’t have any clue how can I add such a functionality in my app. Any pointers, code, example will be very helpful. Again I am using Xamarin, C# and Visual Studio

Coin Marketplace

STEEM 0.16
TRX 0.15
JST 0.028
BTC 54605.61
ETH 2303.24
USDT 1.00
SBD 2.31