Default double tap to take picture

hi all
i am new to android coding but i have a question
right now i'm coding a camera app with gestures my question is
how i could add code that if the user tap once (single tap) on the screen the camera adjust the focus
and when the user tap twice (double tap) on the screen the camera take picture and save it