startKioskMode function

Future<bool> startKioskMode()

Requests the platform to restrict the current user to the app.

Returns true, if platform satisfied the request successfully, false - otherwise.

On Android, Activity.startLockTask is called.

On iOS, UIAccessibility.requestGuidedAccessSession is called. Entering Single App mode is supported only for devices that are supervised using Mobile Device Management (MDM), and the app itself must be enabled for this mode by MDM. Otherwise the result will always be false.

Implementation

Future<bool> startKioskMode() => _channel
    .invokeMethod<bool>('startKioskMode')
    .then((value) => value ?? false);