Questions tagged [device-admin]

The Device Administration API for Android 2.2 and later allows applications to enforce security policies by requiring a password or encryption, and to lock or wipe the device programmatically.

Android 2.2 introduces support for enterprise applications by offering the Android Device Administration API. Administrators can enforce password policies — including alphanumeric passwords or numeric PINs — across devices. Administrators can also remotely wipe (that is, restore factory defaults on) lost or stolen handsets.

226 questions
8
votes
1 answer

"Enable Device Admin" Dialog not showing

I'm trying to enable Device Admin when a user clicks a button. However, the Device Admin never displays. After debugging it, it appears that the app passes over the Activity without executing anything. I tested on an API 16 and API 21 device, both…
Peter
  • 453
  • 3
  • 18
7
votes
2 answers

How Can I disable the Uninstall button of an app in settings android

I am implementing a Parent's And Child's App where parents can track their child the child can not uninstall the app. I am using the Device Administration Feature to implement this. When Enabled the Administrator, I want to disable the…
Arpit116
  • 81
  • 4
7
votes
1 answer

setKeyguardDisabledFeatures(componentName, DevicePolicyManager.KEYGUARD_DISABLE_FEATURES_NONE); not working in android-q / Android 10

In Android Q / Android 10 using USES_POLICY_DISABLE_KEYGUARD_FEATURES of the keyguard_features causes a security exception. devicePolicyManager.setKeyguardDisabledFeatures(componentName,…
Skyyy
  • 1,539
  • 2
  • 23
  • 60
7
votes
2 answers

Prevent app from Uninstall in Android

What I Want I want to have a simple checkbox in my settings menu, which if checked will ENABLE Device Administration for my app and will prevent my app from getting uninstalled. The checkbox when unchecked will DISABLE Device Administration. My app…
Aritra Roy
  • 15,355
  • 10
  • 73
  • 107
6
votes
2 answers

Android Kiosk mode not working when using Android Management API Policy

So I'm trying to get a single use, dedicated app + device to work in kiosk mode + auto launch. The app itself is built in Nativescript (with Angular), so not native Java, however this is still handled via an admin receiver etc as normal. When we use…
Horse
  • 3,023
  • 5
  • 38
  • 65
6
votes
2 answers

Lock device using DeviceAdminReceiver

i am try to lock the device using DeviceAdminReceiver and try to enable administration like following: if (!mDPM.isAdminActive(mDeviceAdminSample)) { Intent intent = new Intent(DevicePolicyManager.ACTION_ADD_DEVICE_ADMIN) …
Umayal
  • 61
  • 1
  • 1
  • 3
6
votes
2 answers

Remotely Wipe Data from device in android 2.2

How to remotely wipe the data from device? I have already tried the sample code given in Device administration. In that we can locally wipe all the device data and reset the device to factory settings. Given in below…
krunal shah
  • 16,089
  • 25
  • 97
  • 143
6
votes
0 answers

Not able to Install app manually in Device Admin App

I've Device admin app which I want to update by manual installing.The problem is when app is in admin mode I'm not getting the install pop up generated by android to install apk but when unpinned or remove app as device admin I am getting that…
6
votes
4 answers

Android: Stop Back Button From Exiting LockTask / Kiosk Mode

I want to implement a KioskMode, I'm targeting only Android L, since this is a very specific App. I already went through the process of setting my App as DeviceAdmin, and DevicePolicyManager.isLockTaskPermitted(this.getPackageName()) already…
timschoen
  • 171
  • 2
  • 9
6
votes
0 answers

How to detect when power button is pressed in Broadcast Receiver class when Device Administrator permission is activated in Android

I am trying to detect when power button is pressed in BroadcastReceiver class, Actually I am implementing it when Device Administrator Permission is activated. I have google so much but not able to find it. In broadcast receiver class, when screen…
Ash
  • 671
  • 2
  • 7
  • 18
5
votes
3 answers

How to activate DeviceAdmin when application start in Android?

Hello I want to start/activate Device Admin when application start without using Intent. Now I am using this code: Intent intent = new Intent(DevicePolicyManager.ACTION_ADD_DEVICE_ADMIN); …
anddev
  • 3,144
  • 12
  • 39
  • 70
5
votes
1 answer

Device Administration Problem after RESTART

I was able to follow and complete the Device Administration Sample. I can successfully lock, wipe data and do other administrative tasks as well. Case 1: The problem I noticed is that whenever I disable the device administrator…
dackyD
  • 267
  • 2
  • 4
  • 14
5
votes
1 answer

Device Admin Receiver not working in few versions

I am working on a security app, which protects device from strangers. In my application, I have a feature that should capture the image from front camera if user tries to unlock device with wrong PIN/Pattern/Password. I have a code something like…
Ana
  • 166
  • 1
  • 16
5
votes
0 answers

How can I lock only device administrators setting

I am working on security application. User can't uninstall the application without applying a correct password. I am on device administrator permission in app. But when user try to install app then he/she can uninstall app by deactivating device…
webaddicted
  • 1,071
  • 10
  • 23
5
votes
2 answers

Detect App being removed from Phone/Device Administrator

There are some apps which can detect when they are being removed from Phone/Device Administrator. I've searched on Android developer website and couldn't found out the flag or receiver which triggers when user clicks on that "tick" checkbox beside…
Ahmad Shahwaiz
  • 1,432
  • 1
  • 17
  • 35
1
2
3
15 16