Need help with cameraview?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

google
4.7K Stars 1.0K Forks Apache License 2.0 80 Commits 182 Opened issues

Description

[DEPRECATED] Easily integrate Camera features into your Android app

Services available

!
?

Need anything else?

Contributors list

No Data

Deprecated

CameraView is deprecated. No more development will be taking place.

Use Jetpack 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

    @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.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.