Questions tagged [device-policy-manager]

DevicePolicyManager is a Java class in Android where device policies (password quality etc) can be set by a third party Device Administrator application.

Methods and constants in DevicePolicyManager are shown here:

http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html

A tutorial to write a Device Administrator application can be found here:

http://developer.android.com/guide/topics/admin/device-admin.html

154 questions
4
votes
2 answers

addPersistentPreferredActivity on api21

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…
4
votes
2 answers

How to apply app restriction on play store for android lollipop

Like google chrome application, can we apply restriction to google play store app too? If anyone has tried it please reply with bundle structure for same. Thanks in Advance!!!
KR_Android
  • 1,149
  • 9
  • 19
4
votes
1 answer

How to disable screen lock password programmatically.

My script creates password and locks the phone, but if I try to change password to blank, it fails. My locking script: DevicePolicyManager deviceManager = (DevicePolicyManager)getSystemService(Context.DEVICE_POLICY_SERVICE); …
sider
  • 687
  • 2
  • 9
  • 23
3
votes
1 answer

Device owner QR stopped working on Android12 devices, getting Can't set up device message

For some reason, the QR code for installing our app as a device owner stopped working on Android12 devices (the same QR codeworks perfectly on previous Android versions). The error message we are getting is: Can't set up device Contact your IT admin…
Daniel
  • 36,833
  • 10
  • 119
  • 200
3
votes
1 answer

Configure APNs on Android 9 (API level 28)

I'm trying to use the new APN api The code looks like this DevicePolicyManager dpm = (DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE); ComponentName deviceAdmin = new ComponentName(getApplicationContext(),…
3
votes
1 answer

App installs from different account in Play Store not being blocked by Android Management API

We are testing the Android Management API for our organization,and we found a workaround to the managed play store: If a user adds his personal account to the device (to access Gmail, for example), he can switch to that account in the Play Store and…
3
votes
1 answer

Programatically setting Always-On VPN, "Admin does not own the profile"

I'm trying to figure out how to configure my VPN application to toggle the Always-On flag from within the application with a toggle. I'm aware of DevicePolicyManager#setAlwaysOnVpnPackage However, it's not very clear how to use this function. I have…
Nathan F.
  • 3,250
  • 3
  • 35
  • 69
3
votes
2 answers

Bluetooth pairing dialog not showing up in Screen Pinning mode

I'm writing an enterprise inspired app based on Device Policy Manager. The app will enable kiosk mode on the device so only one app will be in the foreground & the user won't be able to get out of the app. My app whitelists the particular app that's…
3
votes
0 answers

Kiosk mode for tv app

I've integrated kiosk mode for an android app that runs on TV using http://www.andreas-schrade.de/2015/02/16/android-tutorial-how-to-create-a-kiosk-mode-in-android/. As per the kiosk mode only my app is opening on boot completion.But the problem is…
Daniel
  • 51
  • 4
3
votes
3 answers

Temporarily disabling fingerprint

In FingerPrintSensor enabled devices when we restart a device it temporarily disables fingerprint and force user to unlock device using pin/password/pattern. I want to achieve this functionality so i am using DevicePolicyManger to lock user…
Skyyy
  • 1,539
  • 2
  • 23
  • 60
3
votes
2 answers

Mobile Device Managed Single App Devices

I like to have single android app in our managed devices, we want only that app to be used on the device with necessary restriction, such that, Single use - Device will have only one app, user can't use other apps, like browsing, youtube or…
Vikas Pandey
  • 1,115
  • 1
  • 15
  • 25
3
votes
1 answer

How to restrict/disable print service(s) in Android?

I am trying to achieve a use case where on installing an app, all print services barring one would get disabled on the Android device. To achieve this, I looked into Android's Device Administration API capabilities but that doesn't fulfill the use…
3
votes
2 answers

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

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…
3
votes
3 answers

How to obtain package info list form primary account when application in managed profile?

I got an android demo named BasicManagedProfile which implements some new features about device policy manager. Now I have a question about how to get the other package names when application in managed profile. For example, the demo shows the…
1 2
3
10 11