# cameraview **Repository Path**: ouyangpengdev/cameraview ## Basic Information - **Project Name**: cameraview - **Description**: Easily integrate Camera features into your Android app - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2021-03-23 - **Last Updated**: 2021-08-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # CameraView *This is a preview release. The API is subject to change.* 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).