Husayn Abdul-hakeem
unread,Feb 22, 2021, 2:35:58 PM2/22/21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Android CameraX Discussion Group, varga.pet...@gmail.com, Husayn Abdul-hakeem, Android CameraX Discussion Group
Hi Peter,
I'm glad the CameraController sample helped you.
1. `CameraController` will include a
new API `getCameraInfo()` in the next release, it should allow you to get information about the camera in use, including flash availability.
This means that after CameraX's initialization (`getInitializationFuture()`), you can call `controller.getCameraInfo().hasFlashUnit()`
2. You might be able to attach a touch listener to the controller's attached `PreviewView`, and handle touch tap events. Make sure to return false from the TouchListener so that CameraController also consumes the tap event and focuses on the tap region.
previewView.setOnTouchListener((v, event) -> {
// Draw the focus ring if it's a tap event
return false; // Allow other listeners to consume the event
})