How to add functionality to the official Take Photo Button on Android phones?

I need to add functionality to this button, but I don’t know the name of the button, and I don’t know how to give it functionality.

Does anyone know what to do?

SOLVED:

    mSurfaceView.requestFocus();
    mSurfaceView.setFocusableInTouchMode(true);

public boolean onKey(View v, int keyCode, KeyEvent event) {
    boolean keyManaged=false;
    switch(keyCode)
    {
        case KeyEvent.KEYCODE_CAMERA:
            mCamera.takePicture(null, mPictureCallback, mPictureCallback);  
            keyManaged=true;
            break;
    }
    return keyManaged;
}
+5
source share
2 answers

It is displayed as KeyEvent.KEYCODE_CAMERAin KeyListener .

+4
source

If you need this while your application is active, you can simply register OnKeyListenerand check the event KeyEvent.ACTION_DOWN.

OTOH, , , : http://suhassiddarth.blogspot.com/2010/12/programming-hardware-button-android.html

+1