device-policy-manager

Management API error: persistentPreferredActivities 4

心已入冬 提交于 2020-06-28 06:32:09
问题 I am building an Android KIOSK app, and I try to enable kiosk mode with Android Management API by providing a device policy. My policy json is: { "keyguardDisabled": true, "applications": [ { "packageName": "my.own.app", "installType": "KIOSK", "defaultPermissionPolicy": "GRANT" } ] } What's interesting, the policy is from official API's example, so I suppose that works. Whatever, always get this error: Error info persistentPreferredActivities 4 And just a google search does not give me any

Android Device Policy sync does not work until done manually

穿精又带淫゛_ 提交于 2020-06-27 08:49:09
问题 We have some android devices attached to Android Management API as fully managed work devices. Now when we push out some changes to the device policy such as Factory Reset Disabled , Adjust Volume Button Disabled or any other such controls, the devices don't sync it immediately. In fact we have to manually open up Android Device Policy and click on Sync for it actually get the changes. This is really troublesome because at times the policy doesn't sync for hours together and the devices don't

How to make an application default phone or Assistant handler on the device by giving user an option to make it default app

白昼怎懂夜的黑 提交于 2020-01-11 04:23:04
问题 We have received a policy notice from playStore as: Your app manifest requests the Call Log permission group (e.g. READ_CALL_LOG, WRITE_CALL_LOG, PROCESS_OUTGOING_CALLS) It must be actively registered as the default Phone or Assistant handler on the device. I am not able to understand what Assistant handler on the device . Any inputs or suggestions are most welcome. what are the minimum requirements by the android application to fullfil the requirement. 回答1: Check the documentation at: https:

Screen pinning 3rd party apps programmatically

怎甘沉沦 提交于 2019-12-29 03:29:07
问题 After achieving device ownership, I am trying to implement a method to instruct the device to lock any given app into kiosk mode (or screen pinning mode). Since I have device ownership, the user is not asked for the permission to do so. From the developer website, brief description tells me that it is possible to do what I am trying: http://developer.android.com/about/versions/android-5.0.html#ScreenPinning Programmatically: To activate screen pinning programmatically, call startLockTask()

How to remove set-device-owner in Android DPM?

ぐ巨炮叔叔 提交于 2019-12-28 13:56:14
问题 I have made an app device owner using ADB, by following this link : How to make my app a device owner? but now, I'm not able to revert this. In the device administration Tab, this option is disabled. Not able to change the value of this app. 回答1: You can unset it programmatically. You need to call this function in your device owner application DevicePolicyManager dpm = (DevicePolicyManager) context.getSystemService(Context.DEVICE_POLICY_SERVICE); dpm.clearDeviceOwnerApp(context.getPackageName

Android DevicePolicyManager policies to setup password validations

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 05:46:19
问题 I am using DevicePolicyManager to setup password policies , i have used the below and they are working fine DevicePolicyManager devicePolicyManager; ComponentName demoDeviceAdmin; // Initialize Device Policy Manager service and our receiver class devicePolicyManager = (DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE); demoDeviceAdmin = new ComponentName(this, AdminReceiver.class); devicePolicyManager.lockNow(); devicePolicyManager.wipeData(0); but when i used the below

How do you un-provision a device in order to set the Device Owner?

早过忘川 提交于 2019-12-20 03:56:08
问题 'm trying to set up Device Owner using the sample apps downloadable from developer.android.com https://developer.android.com/samples/NfcProvisioning/index.html https://developer.android.com/samples/DeviceOwner/index.html But when I NFC tap the devices in the logcat for the device I am trying to set the Device Owner for I see this: /? E/ManagedProvisioning﹕ Device already provisioned. However I am doing a factory reset just before attempting the provisioning, so how can I get the device into

How to programmatically set a lock or pin for an app

你。 提交于 2019-12-18 10:20:53
问题 So right now I am trying to develop an Android App for my young children. I want to set a pin or passwords on selected applications for a particular amount of time to prevent them from opening the app. For example, let's say that my daughter wants to play angry birds for some time on my phone while I am doing work. I will select my important apps like messaging, gmail, etc and put a pin or password on it for 30 minutes while she plays angry birds. After 30 minutes, I get my phone from my

Why can't I create a restricted profile when an owner device app is set?

寵の児 提交于 2019-12-12 13:53:28
问题 I recently noticed that when a Device Owner application is set, it's not possible to create a restricted profile. First case : When my device owner app is not set . From Settings>Users : I can "Add user or Profile" , and then choose between a User or a Restricted Profile . Second case : When my device owner app is set . From Settings>Users : I can only "Add user" , and then i get the confirmation to create a new user. In this second case, it's not possible to create a restricted profile. I'd

Adding custom certificate to AndroidCaStore for Wi-Fi and HTTPS

こ雲淡風輕ζ 提交于 2019-12-11 17:34:36
问题 I have a central system App that allows user to install CA's which may be used for HTTPS or Wi-Fi Enterprise connection. This App could be viewed as a Certificate manager which would serve multiple applications. (Although it does other things too, mainly configuration) I am working on Android Pie, and this is my first time working on Android, so pardon my noobness. Based on excellent discussion in the below links including Nikolai's wonderful blog Android Central Keystore https://nelenkov