开发者

broadcast receiver for android.intent.action.CAMERA_BUTTON

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜