Added in API level 1
public interface

IKioskModeManager

com.ardic.android.managers.kioskmode.IKioskModeManager

Class Overview

Provides a set of APIs for Kiosk Mode configurations.

Kiosk Mode restricts the user access to the device by replacing (or covering) the standard user home screen.

The standard user home screen (Kiosk mode application) is the first activity that is displayed when the device boots (CATEGORY_HOME).

Kiosk mode enables lockdown mode prevents the user from subverting the lockdown screen. (e.g. User can not kill the lock down (change the kiosk mode application) or uninstall it )

In addition the Kiosk mode features,

if required, extra functions are available in disableStatusBar(int) api(s) to restrict status bar items one by one.

Summary

Constants
int ALREADY_ACTIVE There is a user home screen has already activated as kiosk mode app.
int OPERATION_FAILED_APP_NOT_EXIST Application does not exist in the system.
int OPERATION_FAILED_CLEAR_APP Operation failed while unregistering the app from default user home screen.
int OPERATION_FAILED_INVALID_APP Application does not have user home activity ( CATEGORY_HOME).
int OPERATION_FAILED_LOCKDOWN Operation failed while enabling lockdown for the user home screen.
int OPERATION_FAILED_SET_APP Operation failed while registering the app as default user home screen.
int OPERATION_FAILED_UNLOCK Operation failed while disabling lockdown for the user home screen.
int OPERATION_SUCCEEDED The operation is succesfully completed.
Public Methods
abstract int clearKioskMode()
Clear Kiosk Mode in the device.
abstract String getKioskModePackage()
Returns existing Kiosk mode application package name.
abstract boolean isKioskModeEnabled()
Returns whether Kiosk Mode is enabled on device or not.
abstract int setKioskMode(String packageName)
Sets Kiosk Mode in the device.

Constants

public static final int ALREADY_ACTIVE

Added in API level 1

There is a user home screen has already activated as kiosk mode app.

Constant Value: 0 (0x00000000)

public static final int OPERATION_FAILED_APP_NOT_EXIST

Added in API level 1

Application does not exist in the system.

Constant Value: -1 (0xffffffff)

public static final int OPERATION_FAILED_CLEAR_APP

Added in API level 1

Operation failed while unregistering the app from default user home screen.

Constant Value: -6 (0xfffffffa)

public static final int OPERATION_FAILED_INVALID_APP

Added in API level 1

Application does not have user home activity ( CATEGORY_HOME).

Constant Value: -2 (0xfffffffe)

public static final int OPERATION_FAILED_LOCKDOWN

Added in API level 1

Operation failed while enabling lockdown for the user home screen.

Constant Value: -4 (0xfffffffc)

public static final int OPERATION_FAILED_SET_APP

Added in API level 1

Operation failed while registering the app as default user home screen.

Constant Value: -3 (0xfffffffd)

public static final int OPERATION_FAILED_UNLOCK

Added in API level 1

Operation failed while disabling lockdown for the user home screen.

Constant Value: -5 (0xfffffffb)

public static final int OPERATION_SUCCEEDED

Added in API level 1

The operation is succesfully completed.

Constant Value: 1 (0x00000001)

Public Methods

public abstract int clearKioskMode ()

Added in API level 1

Clear Kiosk Mode in the device.

Returns
int Following result;
  • OPERATION_SUCCEEDED if successfully cleared.
  • OPERATION_FAILED_CLEAR_APP if unregistering the kiosk mode app from default is failed.
  • OPERATION_FAILED_UNLOCK if disable lock down mode of the kiosk mode app is failed.
  • Throws
    AfexException

    public abstract String getKioskModePackage ()

    Added in API level 1

    Returns existing Kiosk mode application package name.

    Returns
    String packageName Application package name, null if Kiosk Mode is not active.
    Throws
    AfexException

    public abstract boolean isKioskModeEnabled ()

    Added in API level 1

    Returns whether Kiosk Mode is enabled on device or not.

    Returns
    boolean true if Kiosk Mode is enabled on the device else false
    Throws
    AfexException

    public abstract int setKioskMode (String packageName)

    Added in API level 1

    Sets Kiosk Mode in the device. It sets the standard user home screen with lock down mode which blocks changing of user home screen apps to another one or uninstalling it from device until it is cleared by clearKioskMode().

    Parameters
    packageName String: Application package name
    Returns
    int Following results;
  • OPERATION_SUCCEEDED if the operation succeeds.
  • OPERATION_FAILED_INVALID_APP if given application does not have activity CATEGORY_HOME functionality.
  • OPERATION_FAILED_APP_NOT_EXIST if given application does not exist in the device.
  • ALREADY_ACTIVE if given application already active for Kioks mode.
  • OPERATION_FAILED_LOCKDOWN if given application could not be switched to Lockdown mode.
  • Throws
    AfexException