lockscreen

Creating an Android Lock Screen App.

爱⌒轻易说出口 提交于 2019-11-26 15:15:36
问题 How to create a lock-screen app that acts as a lock for android mobile. I did find one, But it was poorly constructed code wise and if I pressed the physical home key, it unlocked, making the application pointless. I did come across a forum stating some method of blocking home button functionality was removed in Android 4.x Yet, I have an awesome idea for a lock-screen but no ground to get started. If anyone has any knowledge on the subject, I'd love to hear it. Thanks all :-) 回答1: Yes, it is

iOS KeyChain not retrieving values from background

≡放荡痞女 提交于 2019-11-26 12:20:00
问题 I am currently storing the username (email) and a salted hash of the email and password in the iOS KeyChain. I\'m using the ARC\'ified version found here. KeychainItemWrapper *wrapper = [[KeychainItemWrapper alloc] initWithIdentifier:@\"MyCustomIdentifier\" accessGroup:nil]; [wrapper setObject:APP_NAME forKey:(__bridge id)kSecAttrService]; [wrapper setObject:email forKey:(__bridge id)kSecAttrAccount]; [wrapper setObject:token forKey:(__bridge id)kSecValueData]; This all works fine when I need

A way to get unlock event in android?

孤街醉人 提交于 2019-11-26 08:56:23
问题 Is there a way to receive something like PHONE_UNLOCKED (with a BroadcastReceiver of some kind)? I have a service running that shows a Toast when the screen is turned on. Unfortunately a few phones don\'t show it until they\'re unlocked. Most of the times the Toast message is already gone then. 回答1: There is a Broadcast Receiver Action ACTION_USER_PRESENT here is the implementation of ACTION_USER_PRESENT and ACTION_SHUTDOWN add this to your application Manifests <receiver android:name="

Preventing status bar expansion

梦想与她 提交于 2019-11-26 08:51:39
问题 Is there anyway to prevent users from sliding the status bar (expand) or collapsing back? I\'m trying out a lockscreen replacement and seems like it\'s a must-have feature. Is there any possible way to do it without requiring root privileges? 回答1: You can actually prevent the status bar from expanding, without rooting phone. See this link. This draws a window the height of the status bar and consumes all touch events. Call the following code just after onCreate(). public static void

How to programmatically lock screen in Android? [duplicate]

天大地大妈咪最大 提交于 2019-11-26 08:24:44
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Lock the android device programatically How can I programmatically lock the screen in Android? 回答1: Check this class : com.android.internal.policy.impl.LockScreen Referenced from here: Can you lock screen from your app? Also check code for enabling and disabling lock Screen in Android. (Referenced from here) KeyguardManager keyguardManager = (KeyguardManager)getSystemService(Activity.KEYGUARD_SERVICE);

How can i set up screen lock with a password programmatically?

六月ゝ 毕业季﹏ 提交于 2019-11-26 08:19:33
问题 Is there any one that can help me with a code to set a password to lock the screen ? thx 回答1: Use this code in your App, it works for me: DevicePolicyManager devicePolicyManager = DevicePolicyManager.getSystemService(Context.DEVICE_POLICY_SERVICE); ComponentName demoDeviceAdmin = new ComponentName(this, name of activity); devicePolicyManager.setPasswordQuality( demoDeviceAdmin,DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED); devicePolicyManager.setPasswordMinimumLength(demoDeviceAdmin, 5);

Creating custom LockScreen in android

我的未来我决定 提交于 2019-11-26 04:22:24
问题 I am developing custom lockscreen app.its working fine in below 4.0 but above 4.0,when we press home button the app stops.is there any solution for this no apps will stop when pressing home button untill unlocking the screen.(like go locker app) 回答1: Another way to develop a LockScreen App is by using Views , let me explain it. First of all you can "disable" in some devices the System lock screen by disabling the KEYGUARD : ((KeyguardManager)getSystemService(Activity.KEYGUARD_SERVICE))

Android activity over default lock screen

微笑、不失礼 提交于 2019-11-26 01:46:28
问题 How can I display an Activity or Dialog to be visible over the lock screen? I have already tried displaying my lock activity when screen turns on by setting various window type in Activity.onCreate() method: TYPE_PRIORITY_PHONE TYPE_SYSTEM_ALERT TYPE_KEYGUARD and others together with SYSTEM_ALERT_WINDOW and INTERNAL_SYSTEM_WINDOW permissions. My activity is visible after I unlock the device. UPDATE: I actually already managed to display my own Activity instead of default lock screen. It work

Android Lock Screen Widget

 ̄綄美尐妖づ 提交于 2019-11-26 01:46:17
问题 A few users have been asking me Android lock screen widgets for my app - I believe they want a widget that stays on their lock screens and allows them to interact with the app. I haven\'t been able to find any official documentation for this - the only thing I found was apps that will take home screen widgets and put them on the lock screen for you. Any clues on where I learn more about building true lock-screen widgets? 回答1: Lock screen interaction is difficult. Android allows basic

Android activity over default lock screen

倖福魔咒の 提交于 2019-11-25 20:32:01
How can I display an Activity or Dialog to be visible over the lock screen? I have already tried displaying my lock activity when screen turns on by setting various window type in Activity.onCreate() method: TYPE_PRIORITY_PHONE TYPE_SYSTEM_ALERT TYPE_KEYGUARD and others together with SYSTEM_ALERT_WINDOW and INTERNAL_SYSTEM_WINDOW permissions. My activity is visible after I unlock the device. UPDATE: I actually already managed to display my own Activity instead of default lock screen. It work perfectly unless you use HOME button. getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN