Open Rupeshrajsingh opened 6 years ago
Try asking on StackOverflow!
Just set a onKeyDown listener and listen 2 KeyEvent.KEYCODE_VOLUME_DOWN or KeyEvent.KEYCODE_VOLUME_UP, then do the TAKEPICTURE action
I think it would be cool if the library listened to these two and treated them as a Gesture
so you can assign GestureAction
s.
you can override method onKeyDown()
in your activity and use it like that
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if(keyCode == KeyEvent.KEYCODE_VOLUME_DOWN || keyCode == KeyEvent.KEYCODE_VOLUME_UP){
// capture image code here ( mCameraView.takePictureSnapshot();)
}
return super.onKeyDown(keyCode, event);;
}
Working on that. Will create a pull request when done.
if i want to take picture by volume UP or volume Down button, so what i do..?