I have an android application in which I take a photo.For that I'm building my own camera using a surfaceview
.In this state of the application, the user has to touch the screen/surfaceview
in order to take a picture.
Also the phone has a button which also the user to open its camera, the default one...which has nothing to do with my app.
What I wonder- is there any posibility for me to have a listener to that hardware button in my android application and to customize its behaviour there!
I repeat-the button I'm talking about is the hardware button
that lies on the left edge of the phone.
EDIT:I understand that this is what I'm looking for android.intent.action开发者_开发百科.CAMERA_BUTTON
.Can someone provide a solid example?
George take a look at:
broadcast receiver for ACTION_CAMERA_BUTTON never gets called
and Android-Broadcast Receiver and Intent Filter
and My BroadcastReceiver is not receiving the BOOT_COMPLETED intent after my N1 boots. Help Please!
You get the picture - use the search :-)
Basically you need a:
Broadcast Reciever
Declare this is your manifest
Deal with the result
精彩评论