This sample demonstrates using Camera Extensions with CameraX API to capture a JPEG. The source code shows an example of how to display the camera preview, query for supported extensions, select an extension, and capture a still image.
The CameraX Extensions API allows users to apply manufacturer specific extensions to still captures. The available extensions include: Auto, Bokeh, Face Retouch, HDR (High Dynamic Range), and Night.
This sample displays the available list of camera extensions for the selected camera lens. Selecting an extensions allows the user to capture a still using that extension.
- Android SDK 32+
- Visual Studio 17+
Architecture: The sample demonstrates using an MVVM architecture. The view model emits the camera state and capture state. The UI emits actions. The activity acts as the mediator between the view model and view.
This sample uses the MS build system. To build this project, use the "msbuild" command or use "Open Solution" in Visual Studio.
- Stack Overflow: http://stackoverflow.com/questions/tagged/android
If you've found an error in this sample, please file an issue: https://github.com/v-hogood/CameraXSamples
Patches are encouraged, and may be submitted by forking this project and submitting a pull request through GitHub.