device-admin

Lock android phone

帅比萌擦擦* 提交于 2021-02-06 09:25:12
问题 I am trying to lock a device programmatically when the user presses a button. I am aware that I will need to use deviceAdminReciever and I have done so but my app crashes whenever I run it The following is my manifest: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.MyApp" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" /> <application android:icon="@drawable/ic_launcher" android

System apps missing after QR provisioning

人走茶凉 提交于 2020-03-03 10:50:15
问题 I'm trying to provision my 7.0 device through QR provisioning. The provisioning was done successfully but it created a separate profile and the apps in the priv-app section are not visible here. When i try to manually install the apps through adb it says success but the app is still not visible. On checking the apps section in settings it says that the app is installed on another user. Any idea on how to get those system apps into the current provisioned profile ? 回答1: You can set the extra

System apps missing after QR provisioning

大憨熊 提交于 2020-03-03 10:48:07
问题 I'm trying to provision my 7.0 device through QR provisioning. The provisioning was done successfully but it created a separate profile and the apps in the priv-app section are not visible here. When i try to manually install the apps through adb it says success but the app is still not visible. On checking the apps section in settings it says that the app is installed on another user. Any idea on how to get those system apps into the current provisioned profile ? 回答1: You can set the extra

Android Kiosk mode not working when using Android Management API Policy

蹲街弑〆低调 提交于 2020-02-28 05:40:30
问题 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 adb to set the device owner, kiosk mode works as expected. adb shell dpm set-device-owner com.domain.app/.DeviceAdminReceiver When we use an Android Management policy to enrol the device and auto install, the kiosk mode is never initiated

Android Kiosk mode not working when using Android Management API Policy

瘦欲@ 提交于 2020-02-28 05:40:23
问题 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 adb to set the device owner, kiosk mode works as expected. adb shell dpm set-device-owner com.domain.app/.DeviceAdminReceiver When we use an Android Management policy to enrol the device and auto install, the kiosk mode is never initiated

Device Policy Manager - Reset Password - Android 3.0 Problems

落花浮王杯 提交于 2020-01-03 03:49:12
问题 I am using Device Policy Manager in my Android App and I have a problem with Honeycomb devices. When attempting to call resetPassword I get an exception thrown. This is not the case in Froyo or Gingerbread, as both of those work fine. The error is: java.lang.RuntimeException: Unable to start receiver Package.Name.Test: java.lang.SecurityException: Permission Denial: writing com.android.providers.settings.SettingsProvider uri content://settings/secure from pid=x, uid=y requires android

Android Device Admin not working

☆樱花仙子☆ 提交于 2020-01-03 03:24:05
问题 I am new in android and i would like to lock the phone. So I Read through Device Admin documentation. and have my code looking like this. But it doesnt seem to notice it on my manifest suggests if i have it defined in it which i do my manifest.xml <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".MainLauncher"android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android

Prevent app from Uninstall in Android

一世执手 提交于 2019-12-29 05:35:29
问题 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 is about security and needs to be protected from getting uninstalled. Can I get a simple solution for this? PS - I have read the documentation about this, but can't seem to get it working. 回答1: This is not possible. You cannot decide on your own to

How to check the device has set password or not in android?

大城市里の小女人 提交于 2019-12-24 13:54:54
问题 In my application, I want to check whether the user has set the password in their android device or not? I tried using device admin apis m not able to get those information. Is there any other way? 回答1: Device administrator doesn't allow you to check whether device has lock screen password (or pattern ...) directly . However you can do it indirectly . Retrieve password quality level from device admin (original value) Set password quality to device admin to minimum level (i.e. PASSWORD_QUALITY

Cannot always launch DevicePolicyManager activity from another activity

风格不统一 提交于 2019-12-24 09:59:36
问题 I have some strange problem. When I try to launch DevicePolicyManager activity from my main activity, it loads properly. However, when I make a notification, call QuestionActivity (if user clicks the notification), and then try to call DevicePolicyManager activity from QuestionActivity, I get (logcat): INFO/ActivityManager(104): Starting activity: Intent { act=android.app.action.ADD_DEVICE_ADMIN cmp=com.android.settings/.DeviceAdminAdd (has extras) } WARN/InputManagerService(104): Window