Search code examples
androidlockscreen

create a custom lockscreen for android and access its camera


Ok so, basically i have a project in mind. I am planning to make a custom lockscreen for android. i need to use the front camera to click a pic of a card, match it to a stored image and only then unlock the phone. Much like face unlock, but another pic instead of a face. could i get a few pointers on how to implement this? If not develop a separate lock screen/app, I don't mind editing the core java file of the LockScreen.java. Any pointers on how to develop this? Thanx, any help will be appreciated. :)


Solution

  • Well first, I guess, you should implement the camera maybe? Check this out on how to do that: http://www.androidzeitgeist.com/2012/10/displaying-camera-preview-instant.html, and then you should implement lockscreen, so you can make a simple normal activity, which you are going to use for the lockscreen. Then you need to make a broadcast receiver, and open your lockscreen activity when the phone awakes. You can read about broadcast receiver here: http://www.vogella.com/articles/AndroidBroadcastReceiver/article.html . Then you probably will need to access the gallery, to pick an image from there. See this: http://viralpatel.net/blogs/pick-image-from-galary-android-app/ . You should edit your question, and make it more understandable, if you want help from more people. I'm hoping this helps. Good luck.