Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/google/cameraview
[DEPRECATED] Easily integrate Camera features into your Android app
https://github.com/google/cameraview
android camera
Last synced: 4 months ago
JSON representation
[DEPRECATED] Easily integrate Camera features into your Android app
- Host: GitHub
- URL: https://github.com/google/cameraview
- Owner: google
- License: apache-2.0
- Archived: true
- Created: 2016-08-04T05:22:14.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-02-08T13:20:53.000Z (almost 5 years ago)
- Last Synced: 2024-09-21T15:47:03.936Z (4 months ago)
- Topics: android, camera
- Language: Java
- Homepage:
- Size: 250 KB
- Stars: 4,735
- Watchers: 150
- Forks: 1,032
- Open Issues: 178
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome - cameraview - [DEPRECATED] Easily integrate Camera features into your Android app (camera)
- awesome - cameraview - [DEPRECATED] Easily integrate Camera features into your Android app (android)
README
# Deprecated
CameraView is deprecated. No more development will be taking place.
Use [Jetpack CameraX](https://developer.android.com/jetpack/androidx/releases/camerax) instead.
# CameraView
This is not an official Google product.
CameraView aims to help Android developers easily integrate Camera features.
Requires API Level 9. The library uses Camera 1 API on API Level 9-20 and Camera2 on 21 and above.
| API Level | Camera API | Preview View |
|:---------:|------------|--------------|
| 9-13 | Camera1 | SurfaceView |
| 14-20 | Camera1 | TextureView |
| 21-23 | Camera2 | TextureView |
| 24 | Camera2 | SurfaceView |## Features
- Camera preview by placing it in a layout XML (and calling the start method)
- Configuration by attributes
- Aspect ratio (app:aspectRatio)
- Auto-focus (app:autoFocus)
- Flash (app:flash)## Usage
```xml
```
```java
@Override
protected void onResume() {
super.onResume();
mCameraView.start();
}@Override
protected void onPause() {
mCameraView.stop();
super.onPause();
}
```You can see a complete usage in the demo app.
## Contribution
See [CONTRIBUTING.md](/CONTRIBUTING.md).