Code example for Camera.Parameters

Methods: setFlashMode, setZoom

0
            if (keyCode == KeyEvent.KEYCODE_VOLUME_UP) {
                mZoom = mZoom + 1;
                if (mZoom > params.getMaxZoom()) {
                    mZoom = params.getMaxZoom();
                } 
                params.setZoom(mZoom);
                setParams(params);
                return true; 
            } 
            if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) {
                mZoom = mZoom - 1;
                if (mZoom < 0) {
                    mZoom = 0;
                } 
                params.setZoom(mZoom);
                setParams(params);
                return true; 
            } 
            if (keyCode == KeyEvent.KEYCODE_SEARCH) {
                if (mTorch) {
                    params.setFlashMode(Parameters.FLASH_MODE_OFF);
                    mTorch = false;
                } else { 
                    params.setFlashMode(Parameters.FLASH_MODE_TORCH);
                    mTorch = true;
                } 
                setParams(params);
                return true; 
            } 
Connect your IDE to all the code out there  Get Codota for Java