I have an android app which is installed on 100+ devices. (Android 5.1.1 API22 and 6.0.1 API 23)
https://developer.android.com/reference/android/app/admin/package-summary.html
I went through all these references but no luck.
Using the devicePolicyManager, I get the error: XXXXX App is not the device owner.
I know there is a way to get device owner by shell command (ADB), but I can't do that on all the devices individually via usb.
DevicePolicyManager deviceManger = (DevicePolicyManager)Forms.Context.GetSystemService(Context.DevicePolicyService); ComponentName demoDeviceAdmin = new ComponentName(Forms.Context, Java.Lang.Class.FromType(typeof(DeviceAdmin))); deviceManger.SetGlobalSetting(demoDeviceAdmin, "wifi_device_owner_configs_lockdown", "1");