Automattic / stories-android

Loop concept app - WP Stories library
GNU General Public License v2.0
17 stars 6 forks source link

Camera: add tap on the view to focus on an area #62

Open mzorz opened 4 years ago

mzorz commented 4 years ago

Right now this is not implemented. Other camera apps allow this to be done, from a quick search I understand this is definitely possible on Camera2, but apparently this capability is not yet available on / exposed by the CameraX API, and also I gathered behavior could be different from vendor to vendor so, might end up being difficult to support correctly in our current team size.

mzorz commented 4 years ago

Brief update: these answers on SO suggest how we could do it on Camera2, and I think we can pass the same parameter on CameraX

previewRequestBuilder.set(CaptureRequest.SCALER_CROP_REGION, zoom)
captureBuilder.set(CaptureRequest.SCALER_CROP_REGION, zoom);

See more on the official docs for CONTROL_AE_REGIONS.

mzorz commented 4 years ago

CameraX alpha05 (released September 5, 2019) has new API support for Tap to focus