Default [Q] Making photo using headphones button

I wrote a code but I do not understand why it does not work
When I'm in the camera and press the button headphones not done any photo Although I set him
The project is attached to the application

Please help
Device Galaxy 1 or 2
Attached Files
File Type: rar CameraApp.rar - [Click for QR Code] (1.47 MB, 2 views)