camera viewfinder
Latest Update | Stable Release | Release Candidate | Beta Release | Alpha Release |
---|---|---|---|---|
October 2, 2024 | - | - | - | 1.4.0-alpha09 |
Declaring dependencies
To add a dependency on camera-viewfinder, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.
Add the dependencies for the artifacts you need in the build.gradle
file for
your app or module:
Groovy
dependencies { // Use to implement camera viewfinders implementation "androidx.camera.viewfinder:viewfinder-view:1.4.0-alpha09" implementation "androidx.camera.viewfinder:viewfinder-compose:1.4.0-alpha09" implementation "androidx.camera.viewfinder:viewfinder-core:1.4.0-alpha09" }
Kotlin
dependencies { // Use to implement camera viewfinders implementation("androidx.camera.viewfinder:viewfinder-view:1.4.0-alpha09") implementation("androidx.camera.viewfinder:viewfinder-core:1.4.0-alpha09") implementation("androidx.camera.viewfinder:viewfinder-compose:1.4.0-alpha09") }
For more information about dependencies, see Add build dependencies.
Feedback
Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.
See the Issue Tracker documentation for more information.
Version 1.4
Version 1.4.0-alpha09
October 2, 2024
androidx.camera.viewfinder:viewfinder-compose:1.4.0-alpha09
, androidx.camera.viewfinder:viewfinder-core:1.4.0-alpha09
, and androidx.camera.viewfinder:viewfinder-view:1.4.0-alpha09
are released. Version 1.4.0-alpha09 contains these commits.
Version 1.4.0-alpha08
September 4, 2024
androidx.camera.viewfinder:viewfinder-compose:1.4.0-alpha08
, androidx.camera.viewfinder:viewfinder-core:1.4.0-alpha08
, and androidx.camera.viewfinder:viewfinder-view:1.4.0-alpha08
are released. Version 1.4.0-alpha08 contains these commits.
New Features
With the update to 1.4.0-alpha08, the CameraX Viewfinder artifact has been moved to its own library group. This change is necessary to improve the modularity and maintainability of the CameraX library.
If you were previously depending on androidx.camera:camera-viewfinder
, androidx.camera:camera-viewfinder-compose
or androidx.camera:camera-viewfinder-core
, you will need to transition your dependencies to the following:
androidx.camera:camera-viewfinder
->androidx.camera.viewfinder:viewfinder-view
androidx.camera:camera-viewfinder-compose
->androidx.camera.viewfinder:viewfinder-compose
androidx.camera:camera-viewfinder-core
->androidx.camera.viewfinder:viewfinder-core
No code changes should be needed to make this transition. The old Viewfinder maven coordinates will no longer receive updates.
Additionally, if you are using Compose with CameraX, a new Compose-first library is now available in alpha: androidx.camera:camera-compose
. This provides the CameraXViewfinder
composable, which is a compose-idiomatic Viewfinder that adapts CameraX’s SurfaceRequest
to Compose, similar to how PreviewView
works for views.