device-admin

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);

Device Owner on rooted Galaxy S8

五迷三道 提交于 2019-12-22 10:42:46
问题 I have been trying to elevate an internal Demo App to Device Owner on my rooted S8 and keep having problems. Ways I have tried: 1) NFC provisioning (as explained here ) When using NFC with Android Bean to set the Device Owner the S8 shows a "Cannot create working profile due to the security guidelines of your device"-error 2) Adb provisioning (from console): When using dpm set-device-owner my/app/namespace/.DeviceAdmin in a windows console I get the following error java.lang.SecurityException

Android Lollipop becoming device admininistrator doesn't work

可紊 提交于 2019-12-22 06:36:53
问题 I'm following this guide on how to have my app request to become a device administrator. This works great on any 4.x android versions with any phone, but doesn't work on Lollipop (I've tried on a Nexus 5 and on a Nexus 7). Logcat shoes the following error: *11-02 07:37:09.649: W/DeviceAdminAdd(10020): Cannot start ADD_DEVICE_ADMIN as a new task* Has anyone else come across this problem with Lollipop? What can be the cause? I've gone over all parts of the guide and made sure my XML, menifest,

How do you un-provision a device in order to set the Device Owner?

早过忘川 提交于 2019-12-20 03:56:08
问题 'm trying to set up Device Owner using the sample apps downloadable from developer.android.com https://developer.android.com/samples/NfcProvisioning/index.html https://developer.android.com/samples/DeviceOwner/index.html But when I NFC tap the devices in the logcat for the device I am trying to set the Device Owner for I see this: /? E/ManagedProvisioning﹕ Device already provisioned. However I am doing a factory reset just before attempting the provisioning, so how can I get the device into

Device Admin Receiver not working in few versions

佐手、 提交于 2019-12-20 02:04:12
问题 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 this. public class MyAdminReceiver extends DeviceAdminReceiver { @Override public void onPasswordFailed(Context context, Intent intent, UserHandle user) { Log.d("MyTag", "onPasswordFailed called"); //Code for starting a service for image capture goes

how to make my application device administrator in android?

非 Y 不嫁゛ 提交于 2019-12-18 12:28:44
问题 I am trying to make my application device administrator , i followed some notes provided on the same at Device admin SAMPLE notes or TUTORIAL here but still could not implement it. Can some one plz point out a working example of the same , i just need to make sure that to uninstall the application , user needs to enter the password which is set in my application. Any help will be useful , Thanks in advance 回答1: i just need to make sure that to uninstall the application , user needs to enter