device-policy-manager

How do I get the signature checksum of my APK?

你。 提交于 2019-12-10 23:30:56
问题 I would like to use the signature checksum instead of the package checksum when provisioning a device with a device owner app. The app will be downloaded from an http server. This post is great when using EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM: Checksum Error while provisioning Android Lollipop But I would like to use EXTRA_PROVISIONING_DEVICE_ADMIN_SIGNATURE_CHECKSUM. See: https://developer.android.com/reference/android/app/admin/DevicePolicyManager.htm The provisioning app and

addPersistentPreferredActivity on api21

元气小坏坏 提交于 2019-12-10 17:16:48
问题 I'm trying to add persisted activity to intent filter, I am profile owner and device owner and this is verified and I have no security exception but still my activity is not interrupting the call, not sure what to do next ...help please ComponentName adminComponent = new ComponentName(getApplicationContext(), EnforcerDeviceAdminReceiver.class); ComponentName handlerComponent = new ComponentName(getApplicationContext(), HandlerActivity.class); devicePolicyManager

Is it possible to have a “Profile Owner” app in Android Lollipop that is not co-present

故事扮演 提交于 2019-12-10 03:54:12
问题 The Lollipop API provides 2 new features "Profile Owner" and "Device Owner" (http://developer.android.com/about/versions/android-5.0.html#Enterprise). Between them, they offer just the features I need for an app that parents can use to control their children's device activity. The setup flow for each is: Device Owner During device setup, using NFC, you can tell Android that you want your app to be a Device Owner. Android then downloads the app from a URL, and the device is encrypted and is

Is it possible to have a “Profile Owner” app in Android Lollipop that is not co-present

安稳与你 提交于 2019-12-05 05:38:31
The Lollipop API provides 2 new features "Profile Owner" and "Device Owner" ( http://developer.android.com/about/versions/android-5.0.html#Enterprise ). Between them, they offer just the features I need for an app that parents can use to control their children's device activity. The setup flow for each is: Device Owner During device setup, using NFC, you can tell Android that you want your app to be a Device Owner. Android then downloads the app from a URL, and the device is encrypted and is provisioned with the app as a Device Owner. So for someone installing my app from Google Play, I would

How to enable Non market application in Managed Profile (Android 5.0) programmatically

自闭症网瘾萝莉.ら 提交于 2019-12-05 01:24:23
问题 Hello I was checking Android 5.0 samples there was sample BasicManagedProfile. Using that I have created managed profile successfully. But it was managing only Market applications (Downloaded from Google Play) as managed application. But I tried with custom say it HelloWOrld application that is not available on Market. It gave me the error " java.lang.IllegalArgumentException: Only system apps can be enabled this way ." devicePolicyManager.enableSystemApp( BasicDeviceAdminReceiver

Android - how to completely disable keyguard

末鹿安然 提交于 2019-12-05 01:05:41
问题 I want to control enabling/disabling keyguard on the device. To do that I'm using DevicePolicyManager and KeyguardLock API of Android SDK. Below is my implementation to manage this: public class DeviceLocker { private static DeviceLocker instance; public static synchronized DeviceLocker getInstance(Context context) { if(instance==null) { instance = new DeviceLocker(context); } return instance; } private Context context; private KeyguardLock lock; private DeviceLocker(Context context) { this

How do I get the signature checksum of my APK that is signed with only the v2 scheme?

送分小仙女□ 提交于 2019-12-05 00:26:28
问题 I previously posted a question on how to get the signature checksum of my APK here: How do I get the signature checksum of my APK? The answer is perfect if an app is signed with the v1 signature scheme or the combination v1/v2 signature schemes. (Jar and Full APK Signatures) However, since my app will only be running on Android O or greater (it is a device specific app), I will only be signing it with the APK signature scheme v2 (v2 scheme). I will be using EXTRA_PROVISIONING_DEVICE_ADMIN

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

让人想犯罪 __ 提交于 2019-12-04 22:26:55
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. Check the documentation at: https://developer.android.com/reference/android/telecom/TelecomManager#ACTION_CHANGE_DEFAULT_DIALER Sample code:

How do I get the signature checksum of my APK that is signed with only the v2 scheme?

久未见 提交于 2019-12-03 16:03:14
I previously posted a question on how to get the signature checksum of my APK here: How do I get the signature checksum of my APK? The answer is perfect if an app is signed with the v1 signature scheme or the combination v1/v2 signature schemes. (Jar and Full APK Signatures) However, since my app will only be running on Android O or greater (it is a device specific app), I will only be signing it with the APK signature scheme v2 (v2 scheme). I will be using EXTRA_PROVISIONING_DEVICE_ADMIN_SIGNATURE_CHECKSUM. See: https://developer.android.com/reference/android/app/admin/DevicePolicyManager

How to enable Non market application in Managed Profile (Android 5.0) programmatically

六月ゝ 毕业季﹏ 提交于 2019-12-03 15:39:09
Hello I was checking Android 5.0 samples there was sample BasicManagedProfile. Using that I have created managed profile successfully. But it was managing only Market applications (Downloaded from Google Play) as managed application. But I tried with custom say it HelloWOrld application that is not available on Market. It gave me the error " java.lang.IllegalArgumentException: Only system apps can be enabled this way ." devicePolicyManager.enableSystemApp( BasicDeviceAdminReceiver.getComponentName(activity), packageName); code that i was using to enable application. Is there any way or API to