commit | b4f8528d6b8c3d9fd44ced49c66fd14208ab95be | [log] [tgz] |
---|---|---|
author | Trevor McGuire <[email protected]> | Fri Feb 16 11:02:04 2024 -0800 |
committer | GitHub <[email protected]> | Fri Feb 16 19:02:04 2024 +0000 |
tree | c3e8979d5d9a46f39d64b9142e61d429eed74751 | |
parent | a8600649ff39fca47237bc7fdbc62db02736418d [diff] |
Set SurfaceProvider directly on PreviewViewModel (#112) * Set SurfaceProvider directly on PreviewViewModel Rather than wait for a SurfaceProvider to start the camera, it is set eagerly on the ViewModel/CameraUseCase By waiting for the SurfaceProvider, this was masking some behavior where the camera may not have been initialized before starting, so starting the camera now explicitly waits for initialization to be finished * Fix tests * Remove SurfaceProvider from CameraXViewfinder Removes onSurfaceProviderReady and onSurfaceProviderDisposed from CameraXViewfinder, and replaces them with a parameter where a SurfaceRequest is passed in directly. * Simplify and document PreviewViewModel CameraUseCase initialization * Remove unused surfaceProvider instance variable from FakeCameraUseCase
This repository contains Jetpack Camera App. It's a work in progress ๐ง.
Jetpack Camera App is (will be) a fully functional camera app, focused on features used by app developers, and built entirely with CameraX, Kotlin and Jetpack Compose. It follows Android design and development best practices and it's intended to be a useful reference for developers.
This repository is currently in early development, and will go through many changes.
This project uses the gradle build system, and can be imported directly into Android Studio.
TBD
TBD
Every file containing source code must include copyright and license information. This includes any JS/CSS files that you might be serving out to browsers. (This is to help well-intentioned people avoid accidental copying that doesn't comply with the license.)
Apache header:
Copyright (C) 2023 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.