Hello, I want to start / activate Device Admin when starting the application without using Intent. Now I use this code:
Intent intent = new Intent(DevicePolicyManager.ACTION_ADD_DEVICE_ADMIN); intent.putExtra(DevicePolicyManager.EXTRA_DEVICE_ADMIN, Global.mDeviceAdminSample); intent.putExtra(DevicePolicyManager.EXTRA_ADD_EXPLANATION, "Additional text explaining why this needs to be added."); startActivityForResult(intent, RESULT_ENABLE);
But I do not want to use the intention. I want to start Device Admin directly.
Does anyone know how I can do this?
Thanks.
source share