Source of Android's Lock Screen

Source of Android's lock screen

Do an actual full checkout of the source according to Google's directions.

As of Android 4.2, the keyguard source is at frameworks/base/policy/src/com/android/internal/policy/impl/keyguard. There's a mirror on GitHub you can look at online (I pegged this link to the JB MR 1.1 release in case the location changes again in a future release).

When this question was originally answered, Android 2.3 and lower had their lockscreen source at frameworks/policies/base/phone/com/android/internal/policy/impl.
You can also view these sources online in their GitHub mirror; that source is still kicking in the current repo, but hasn't been updated in several years.

Provide custom lock screen method

It's not possible unless you create your own custom lock screen. You can build one pretty easily though with the Adenda SDK. Sign up for it on their website, they usually respond pretty quickly

Developing a custom lock screen

There is no support for creating a "custom lock screen aap" in the Android SDK. You can only modify the lock screen behavior in custom firmware.

UPDATE

Note that Android 4.2 does allow you to create app widgets that can be added to the device's lockscreen, which may meet your needs.

Creating an Android Lock Screen App.

Yes, it is possible. This is a simple lock screen Source Code from GitHub

Creating an app that works like a lock is no big deal but as you said for Home key issue, I would suggest you go on and develop the App as much as you need and the only final area you would get stuck is the home key control so, try to find some tricky way to get the control of home key and make it as an app launcher for your lock app. It is not very complicated but kinda tricky though. I will post you, if I can find any Home-key access source codes

PS:

Here is the tutorial for accessing Home Key

I found the home key override somewhere. Add these lines in the App Manifest.

Following two lines will do the magic

 <action android:name="android.intent.action.MAIN" />              
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />

and override this method in your activity

@Override
public void onAttachedToWindow() {
super.onAttachedToWindow();
this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
}

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if(keyCode == KeyEvent.KEYCODE_HOME)
{
Log.i("Home Button","Clicked");
}
if(keyCode==KeyEvent.KEYCODE_BACK)
{
finish();
}
return false;
}

Keep in mind that I didn't test these codes or methods, just tried to help you (you might find some drawbacks).

PS: based on the votes I can guarantee that my suggestion is working and you can develop such app with the above help :)

How to access programmatically what is displayed in an Android lock screen

is this default Android stuff or HTC
Sense specific only?

It is HTC Sense only. You cannot modify the lock screen of the device from SDK code -- only via firmware modifications. Sorry!

Need working solution to use Android Pattern Lock Screen in custom Application (and not source code redirects)

After struggling with those custom buttons, spending time digging out the LockPattern Source from the AOSP, I stumbled upon this awesome library which solved my problem. Hope it helps you out as well.

Android Lock Pattern Library



Related Topics



Leave a reply



Submit