setDeviceAdmin

fun setDeviceAdmin(app: String, enabled: Boolean): Int

Set app as device administrator

Return

Const.EXECUTE_COMPLETE - function completed

Const.VALUE_IS_EMPTY - The specified value is empty. Function failed

Const.APPLICATION_NOT_INSTALLED - The specified application was not found on the device. Function failed

Parameters

app

Application name or package name

enabled

Set / Revoke