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
0
votes
1 answer

How to remove fingerprint authentication from Android KeyGaurd manager?

I've used keyguard manager inside my app to perform some action if and only if the user authenticates using his default device lock credentials, now what is happening is that my device has both fingerprint and pattern/pin lock enabled and when the…
0
votes
1 answer

PackageName in DevicePolicyManager.clearPackagePersistentPreferredActivities(ComponentName admin,String packageName)

What does represent the packageName in DevicePolicyManager.clearPackagePersistentPreferredActivities(ComponentName admin,String packageName)? Is it the package name of the admin or is it the package name in of the activity of…
Bazouk55555
  • 557
  • 6
  • 24
0
votes
0 answers

Set system app as lock task package using device owner

My app is a system signed Device-owner app, and i would like to set my own app in lock task mode. However the method in DevicePolicyManager setLockTaskPackages doesn't work for system apps even if its the same app calling. …
0
votes
0 answers

Install custom apps or apps from google play store in Work Profile programmatically

I want to install custom apps or apps from google play store in Work Profile without user interaction. It can be done using Android Device Policy app and Android Management API remotely only for play store apps. I've created custom Work Profile…
0
votes
1 answer

Oppo phones showing yellow line at Notification Bar

I have an app which uses Administrator permission, In oppo phones if user provides Administrator permissions then Oppo phone is showing yellow line at Notification bar (Continuously flashing notification). How can I prevent that notification in oppo…
0
votes
1 answer

dpm set-device-owner not working in redmi note 4

I am trying to make an application device-admin, for that I'm following Developing a Device Administration Application And when I try to run below command ./adb shell dpm set-device-owner com.example.app/.receiver.AdminReceiver it gives…
umesh
  • 1,148
  • 1
  • 12
  • 25
0
votes
1 answer

Android zero-touch enrollment JSON not able to configure wifi

I was following guide mentioned here https://developers.google.com/zero-touch/guides/customer/emm#provision to prepare a JSON which then I can scan and enroll device to our MDM provider. Here is my sample…
c2tarun
  • 776
  • 2
  • 9
  • 27
0
votes
1 answer

Turning off the screen in android

Hi, for a project I'm working on I have to turn off the screen of the android device. After searching on here I came to use this code: public static final int REQUEST_ADMIN_ENABLE = 12345; ComponentName dPAComponent; DevicePolicyManager…
0
votes
1 answer

Update a device owner managed android app silently (in kiosk mode)

I have created a device owner app. It can turn an app installed already into Kiosk Mode, I am trying to update the kiosk app remotely, not from playstore, but it's not getting updated. Could anyone please help me with some pointers?
rcde0
  • 4,192
  • 3
  • 21
  • 31
0
votes
1 answer

Create launcher that kills all the previously opened apps

I have a simple launcher that enlists all the apps in a listview. I just want one feature in this launcher; when a certain item(say 5th item) in the listview is clicked, I want to completely kill all the previous opened apps and then open the 5th…
0
votes
2 answers

How to get hidden packages with DevicePolicyManager?

I am implementing an application that uses DevicePolicyManager. I have provisioned my device using adb and my app is running on device admin mode. I am using setApplicationHidden method to hide/unhide applications using their package name. I want to…
dogauzun
  • 133
  • 2
  • 10
0
votes
0 answers

Android [M] - Revoking permissions crash applications

The Android API level 23 (Marshmallow) introduced a new set of methods to deal with permissions in its new run-time permission model. From the class DevicePolicyManager (which only can be called by profile/device owner), there is a method called…
0
votes
0 answers

using DevicePolicyManager resetPassword succeeded,but unlock the screen failure

I developing a DeviceManager sample app,and i use resetPassword() method to reset screen lock password. using some long length password,just like "123456"、"abcdef",this method result tells succeeded,and working good on screen lock. using some short…
0
votes
1 answer

using DevicePolicyManager.setStatusBarDisabled crashed on Android5.0

I'm creating a Device owner app for students,and need to disable statusbar, i have already my app to the Device owner app. using other method of DevicePolicyManager.it ran successfully. but when i use setStatusBarDisabled.it told no such…
0
votes
0 answers

Android set Screen Lock support pin

I used devicePolicyMananger.resetPassword to set lock screen pass . but i want to change the support pin that used when admin forgot password . I mean change support pin pass.
mhk
  • 112
  • 1
  • 11