create a custom lockscreen for android and access its camera - android

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. :)

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.

Related

Tasker : create a bubbled floating windows?

What i wanted to do, and didn't find any suitable solution, is :
create a scene in tasker (no problem on doing it :) )
display this scene on overlayed mode on other app (ex: waze,). Overlay is mandatory (as i know but i am maybe wrong) to let's the underlayed application work and refresh screen normally
allow interaction with button on the scene, just like we can do it if i choose the dialog mode for my scene. The problem with dialog mode is that the underlayed apps screen does not refresh.
In fact what i wanted to to is to display some button when i am running waze, to allow me to sens ETA Sms to my wife, or skip to the next track on my musics apps, or close waze quickly.....
As a resume i want to do what is
create floating windows like offered by apps like Overlays
but only using tasker
Best regards
Best
Please share some images of your requirements so that we can help you better but anyways I found a solution maybe it'll help you with some little customization.
According to my understanding, you need something like this:
You can download the whole project and customize it according to your requirements from Here

How to take a photo in your own view for an android app?

so below is the activity I am attempting to build.
Below, you see an imageview of a house and a lake. When the user enters the activity, a camera will be opened inside a view (in this case, the view is the house and lake) and then the user will press the camera icon to take the picture. How do i go about doing that? I can't find an example online.
Hope you guys can provide an example or point me to a good documented source.
cheers!
Short: NO, you don't have the skills for that.
Longer: Every device maker also makes the camera app that comes with the device, it handles the inner workings / hardware stuff. Unless you want to deal with the (huge number) of device types, just use the Intent & Camera App already there. No need to get grey hairs over this. It can be done, WhatsApp does it, but there is a lot of brain power to get it done on their side.
What you CAN do is using the Intent and receive for a camera app. Like so.
To get an idea how hard it probably is: Capture Photo without Intent

to get a current screen view from my own application

I am running one external application from my own application and when this application opens, i want to get a view of that external application in my own application. So that i can capture a screenshot of it. Please help me in this.
I dont think thats possible. The communication between applications or even activities is limited to passing data to each other through intents. I don't think sharing references to objects across applications is possible. Please correct me.
Such a thing would be possible if they allowed you to launch an external application in your own window.
I did some search and it is quite likely it may not be possible, however I have found a possible way. Take a look at this link, which states that
Or If you want to take a ScreenShot of your current device screen (any
application) then you have to root permission, and read framebuffer
for that which will give raw data of current screen then convert it to
bitmap or any picture file you can do it in your service.
Which means that whenever your application starts an application you will need to create a service that reads the framebiffer, but if an activity is used for taking the screenshot then it will not be useful because the screenshot will then be of that activity.
See this and this, these links are related to your question as well. And see if it works.
Hope this helps.

How can I develop an app able to actually replace lockscreen? [duplicate]

I know that there is already some apps can do this, such as:
WidgetLocker Lockscreen
Flyscreen
I want to know how to do this in my app? What classes I can use? Or what articles I should read? I don't want to change the Android's source code.
And I wonder if it will be different to deal with when the screen is locked by draw pattern?
Have a look at this answer. You need to write your own home screen app which will implement the lockscreen behaviour that you require. There is sample code for writing your own home screen app in the Android SDK.

How to customize Android's LockScreen?

I know that there is already some apps can do this, such as:
WidgetLocker Lockscreen
Flyscreen
I want to know how to do this in my app? What classes I can use? Or what articles I should read? I don't want to change the Android's source code.
And I wonder if it will be different to deal with when the screen is locked by draw pattern?
Have a look at this answer. You need to write your own home screen app which will implement the lockscreen behaviour that you require. There is sample code for writing your own home screen app in the Android SDK.

Categories

Resources