keyguard

Unlock the Screen Programmatically

落花浮王杯 提交于 2019-11-29 06:39:52
I have a share button in the GCM notification . On click of the share button, I need to launch share intent. Everything works perfectly. Only problem that I'm facing is Lollipop lock screen feature. When I click share button from lock screen, my intent dialog appears below the lock screen and user has to unlock the screen to see the dialog. I want to unlock the screen programatically, when share button is clicked. I tried with Power Manager, But all it's wakeClock flags are deprecated and WindowManager.LayoutParams.Flag_KEEP_SCREEN_ON is recommened to use. But I'm not using activity here. I'm

Unlock the Screen Programmatically

允我心安 提交于 2019-11-27 23:55:06
问题 I have a share button in the GCM notification . On click of the share button, I need to launch share intent. Everything works perfectly. Only problem that I'm facing is Lollipop lock screen feature. When I click share button from lock screen, my intent dialog appears below the lock screen and user has to unlock the screen to see the dialog. I want to unlock the screen programatically, when share button is clicked. I tried with Power Manager, But all it's wakeClock flags are deprecated and

How to lock/unlock phone programmatically : Android

江枫思渺然 提交于 2019-11-27 13:46:51
In my application, I need to lock and unlock phone. I searched for it, I found many answers, I tried them but no one is working. I need to unlock phone on onCreate() and lock phone again while I'm finishing my activity. Do you guys know any method to do the same? Thanks friends. EDIT: Some links, that I have tried are: How to display Activity when the screen is locked? Android screen lock/ unlock programmatically https://groups.google.com/forum/#!topic/android-developers/BOLjJTMO4zE In my application I'm scheduling a task using AlarmManager and then enabling the phone lock. My activity is

Disabled Keyguard Lock re-enables itself after clicking on a notification

。_饼干妹妹 提交于 2019-11-27 07:45:37
问题 In my application I disable the keyguard lock (i.e.Remove Lockscreen) using the code below and it works fine until I click on any notification in the notification bar. If I click on a notification the lock screen is automatically re-enabled. Any help is appreciated. private void remove_lockscreen() { final CheckBoxPreference lock = (CheckBoxPreference) findPreference("remove_lockscreen"); KeyguardManager km = (KeyguardManager)getSystemService(KEYGUARD_SERVICE); KeyguardLock kl = km

Android - Wake Up and Unlock Device

别说谁变了你拦得住时间么 提交于 2019-11-27 03:01:06
Application description: The application is intended as a safety program for a specific client (not to be deployed publicly). When the application has not detected movement for a certain period of time, the application should sound an alarm and bring itself to the foreground if it is in the background or the device is asleep. The problem: In the event the device is asleep and locked, we need to wake up and unlock the device. Using various techniques found here on SO and other places, we've been able to (partially) wake and unlock the device, however this ONLY behaves properly when the device

Disable Home Button in Android ICS (4.0)

一个人想着一个人 提交于 2019-11-27 01:38:31
I am making a proprietary app for a company which will never release it to the Android Market (or Play Store I guess now) in Ice Cream Sandwich (Android 4.0). I need to disable the Home so the users cannot maliciously uninstall software or delete the data that the app captures. This latest version is the first to be written in 4.0, the previous versions were written in 2.2 and 3.2. For disabling the Home button in 2.2, I associated the app as a home replacement, so the button just reopened the app, but I can no longer use this method, as that somewhat prevents us from doing our updates to the

How to lock/unlock phone programmatically : Android

限于喜欢 提交于 2019-11-26 16:32:45
问题 In my application, I need to lock and unlock phone. I searched for it, I found many answers, I tried them but no one is working. I need to unlock phone on onCreate() and lock phone again while I'm finishing my activity. Do you guys know any method to do the same? Thanks friends. EDIT: Some links, that I have tried are: How to display Activity when the screen is locked? Android screen lock/ unlock programmatically https://groups.google.com/forum/#!topic/android-developers/BOLjJTMO4zE In my

Android - Wake Up and Unlock Device

末鹿安然 提交于 2019-11-26 10:20:39
问题 Application description: The application is intended as a safety program for a specific client (not to be deployed publicly). When the application has not detected movement for a certain period of time, the application should sound an alarm and bring itself to the foreground if it is in the background or the device is asleep. The problem: In the event the device is asleep and locked, we need to wake up and unlock the device. Using various techniques found here on SO and other places, we\'ve

Disable Home Button in Android ICS (4.0)

笑着哭i 提交于 2019-11-26 09:45:02
问题 I am making a proprietary app for a company which will never release it to the Android Market (or Play Store I guess now) in Ice Cream Sandwich (Android 4.0). I need to disable the Home so the users cannot maliciously uninstall software or delete the data that the app captures. This latest version is the first to be written in 4.0, the previous versions were written in 2.2 and 3.2. For disabling the Home button in 2.2, I associated the app as a home replacement, so the button just reopened