device-admin


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

Android 4.0 Device Admin Receiver not working

此生再无相见时 提交于 2019-12-24 07:37:36
问题 I'm trying to build a really simple app to wipe all the user data off a ICS device. I've tried to create the app using the source code on http://developer.android.com/guide/topics/admin/device-admin.html and http://marakana.com/s/post/1291/android_device_policy_administration_tutorial But I'm having an issue, no matter what I do, the broadcast receiver for prompting the user to allow admin does not appear! Heres what I got so far if anyone can help with this issue. Manifest: <uses-sdk android

Android DevicePolicyManager policies to setup password validations

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 05:46:19
问题 I am using DevicePolicyManager to setup password policies , i have used the below and they are working fine DevicePolicyManager devicePolicyManager; ComponentName demoDeviceAdmin; // Initialize Device Policy Manager service and our receiver class devicePolicyManager = (DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE); demoDeviceAdmin = new ComponentName(this, AdminReceiver.class); devicePolicyManager.lockNow(); devicePolicyManager.wipeData(0); but when i used the below

programmatically enable android device administration

爱⌒轻易说出口 提交于 2019-12-24 02:42:25
问题 I want to write tests for an application that uses the android device administration API . My problem is that the user needs to manually grant one-time approval for the application to have admin rights, otherwise a SecurityException is thrown at runtime. a user can manually enable/disable admin rights for applications by going to settings->location & security -> select device administators. I would like to do it programmatically from within an AndroidTestCase . 回答1: I did not find a way to

How to activate device admin on google glasses?

旧巷老猫 提交于 2019-12-23 21:04:31
问题 I want to disable camera on my google glasses. Is there any way to activate device admin and call DevicePolicyManager.setCameraDisabled(admin, disabled) method. 回答1: Android stack on Google glass doesn't support admin feature. 来源: https://stackoverflow.com/questions/27740677/how-to-activate-device-admin-on-google-glasses

Pass result from DeviceAdminReceiver back to calling activity

孤街浪徒 提交于 2019-12-23 04:33:30
问题 My activity (MyActivity.class) executes the method to set the screen lock as follow: startActivityForResult(Security.setLockscreen(getBaseContext()), 1001); Then my receiver class logs the change to the screen lock as follow: public class MyDeviceAdminReceiver extends DeviceAdminReceiver { @Override public void onPasswordChanged(Context context, Intent intent) { super.onPasswordChanged(context, intent); // pass result back to calling activity intent = new Intent(context, MyActivity.class);

工具导航Map