The DevicelockAgent provides APIs to lock/unlock the remote devices and to get the lock status of the local and remote devices. Refer the Javadoc for complete API list.

The following are the main functionalities provided by this agent:

  • Application Lock: Apart from the allowed apps, other apps cannot be executed.
  • Screen Lock: Similar to Touch Lock, but some more information can be transferred.
  • Status Bar Lock: Notification and Status Bar can be locked.

Permissions required

The following permissions must be added in the application manifest to use the DeviceLockAgent APIs:

  • Application Lock : android.permission.sec.MDM_APP_MGMT
  • Status Bar Lock : android.permission.sec.MDM_KIOSK_MODE

The following Listeners can be registered with this agent to get the required callbacks:

  • DeviceLockedListener: Session participants who have registered DevicelockAgent to this listener are notified on device lock, while receiving the lock command.
  • UserLockStatusChangedListener: Changes in the lock status of the Session participants are notified through this listener.
  • AppLockedListener: Application lock status is notified through this listener.
  • AppLockedListChangedListener: Changes in the locked and allowed packages list are notified through this listener.