device-admin

Lock an Android Phone [duplicate]

时间秒杀一切 提交于 2019-11-30 19:39:34
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Lock the android device programatically I want to be able to lock the Android phone with a password when I run a method. Does anyone have a reference or sample code for me to refer. Thanks EDIT I have tried using KeyguardManager mgr = (KeyguardManager)getSystemService(Activity.KEYGUARD_SERVICE); KeyguardLock lock = mgr.newKeyguardLock(KEYGUARD_SERVICE); lock.reenableKeyguard(); as said by the answer below, but I

Android - Activation of the system key lock (aka lock screen)

一笑奈何 提交于 2019-11-30 09:00:40
I have to activate android's system key lock (the one you get when you press the power off / hang up button). See here: I already browsed the docs but everything I found was PowerManager and KeyguardManager . Both seem not to be the solution :-(. So, does everyone know how to achieve that from a android application? (If special permissions are required, that is no problem but changing the device's settings is not a solution...) EDIT : Or does someone know that this is definitely not possible at all? Btw. craigs solution with sending keys does not work anymore (see comments). I have been

how to make my application device administrator in android?

為{幸葍}努か 提交于 2019-11-30 07:09:00
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 i just need to make sure that to uninstall the application , user needs to enter the password which is set in my application. Fortunately, this is not possible for an SDK application. Even a

Android - Activation of the system key lock (aka lock screen)

為{幸葍}努か 提交于 2019-11-29 13:19:50
问题 I have to activate android's system key lock (the one you get when you press the power off / hang up button). See here: I already browsed the docs but everything I found was PowerManager and KeyguardManager. Both seem not to be the solution :-(. So, does everyone know how to achieve that from a android application? (If special permissions are required, that is no problem but changing the device's settings is not a solution...) EDIT : Or does someone know that this is definitely not possible

How do disable lockscreen in android?

僤鯓⒐⒋嵵緔 提交于 2019-11-29 10:53:17
I have my app registered as device administrator, with the appropriate lock screen permissions. I can access the method to lock the device, but cannot disable lockscreen. Is there an API method available that will disable lock? Jorgesys Is there an API method available that will disable lock? NO this is not supported, for security reasons. all of that stuff was deprecated Disable/Delay Android Lock Screen Programmatically Android: remove or disable programmatically the Lock Screen on Samsung Galaxy S2 device 来源: https://stackoverflow.com/questions/21632217/how-do-disable-lockscreen-in-android

Firebase message with high priority not waking device from Doze android 6+

浪尽此生 提交于 2019-11-28 17:52:11
I have migrated my project from using GCM to use Firebase. Push notification comes through ok when the device is awake or been asleep recently but if I leave the device for say an hour, no push is sent until I wakeup the device. The Android docs say that if you need to wake a device to deliver a message, then use FireBase with priority set to high. It also says that device Admin apps are not subject to Doze restrictions, my app is a device admin app. I thought I would mention that when I migrated the project from GCM to FCM, I only specified the package name in the firebase console and not the

How to remove an app with active device admin enabled on Android?

爷,独闯天下 提交于 2019-11-28 16:47:23
I wrote an app with device admin enabled (DevicePolicyManager) and installed. But when I want to uninstall it, it returns failed with this message WARN/PackageManager(69): Not removing package com.mypackage.test: has active device admin How can I uninstall it, or uninstall it programmically? Thanks. Atmaram Go to SETTINGS->Location and Security-> Device Administrator and deselect the admin which you want to uninstall. Now uninstall the application. If it still says you need to deactivate the application before uninstalling, you may need to Force Stop the application before uninstalling. You

Device Password in Android is existing or not

对着背影说爱祢 提交于 2019-11-28 11:40:37
问题 I am trying to know whether a screen lock password is already present or not, when my app has started. case 1: If there is a screen lock password already... I would do the locking (locknow()) using device manager and ask the user to login again. case 2: If there is no screen lock password.... i would ask user to set a password using devicepolicymanager class. But I was unable to know, how to check whether a screen lock password is already present or not. is there any boolean returning method

Firebase message with high priority not waking device from Doze android 6+

我的梦境 提交于 2019-11-27 10:48:57
问题 I have migrated my project from using GCM to use Firebase. Push notification comes through ok when the device is awake or been asleep recently but if I leave the device for say an hour, no push is sent until I wakeup the device. The Android docs say that if you need to wake a device to deliver a message, then use FireBase with priority set to high. It also says that device Admin apps are not subject to Doze restrictions, my app is a device admin app. I thought I would mention that when I

How to remove an app with active device admin enabled on Android?

限于喜欢 提交于 2019-11-27 09:55:34
问题 I wrote an app with device admin enabled (DevicePolicyManager) and installed. But when I want to uninstall it, it returns failed with this message WARN/PackageManager(69): Not removing package com.mypackage.test: has active device admin How can I uninstall it, or uninstall it programmically? Thanks. 回答1: Go to SETTINGS->Location and Security-> Device Administrator and deselect the admin which you want to uninstall. Now uninstall the application. If it still says you need to deactivate the