Android - How to take a picture by pressing the volume up key?

I want to develop an application using a Bcoda Wheel device.

In this application, I want to take a picture using the up key (volume up).

But I do not get the built-in camera listener in my application.

In my application, camera capture capture does not integrate. My application simply conveys a keystroke to increase volume through a broadcast or something else.

1) Start the camera (in the built-in application). 2) My increase in the volume of the application call using the receiver. 3) The Bcoda Bluetooth device clicked and clicked the photo (same as wear or some kind of Bluetooth device).

My application works as an intermediate.

Edit:

Runtime r = Runtime.getRuntime();


                try {
                    Process process = r.exec("input keyevent 24");
                    InputStream stream = process.getErrorStream();

                    } catch (Exception e) {

                    }

Vol + Button, Forefront, . , Vol + .

.

+4

All Articles