[] Easily integrate Camera features into your Android app

Related tags

Media android camera
Overview

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

<com.google.android.cameraview.CameraView
    android:id="@+id/camera"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:keepScreenOn="true"
    android:adjustViewBounds="true"
    app:autoFocus="true"
    app:aspectRatio="4:3"
    app:facing="back"
    app:flash="auto"/>
    @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.

Comments
  • Black CameraView after onResume only in Android 7

    Black CameraView after onResume only in Android 7

    Black CameraView after onResume (after onPause) only in Android 7. The camera is taking photo but the view is always black when returning to activity. (ONLY for Android Nougat 7)

    opened by gmerwan 48
  • Security Policy violation Binary Artifacts

    Security Policy violation Binary Artifacts

    This issue was automatically created by Allstar.

    Security Policy Violation Project is out of compliance with Binary Artifacts policy: binaries present in source code

    Rule Description Binary Artifacts are an increased security risk in your repository. Binary artifacts cannot be reviewed, allowing the introduction of possibly obsolete or maliciously subverted executables. For more information see the Security Scorecards Documentation for Binary Artifacts.

    Remediation Steps To remediate, remove the generated executable artifacts from the repository.

    Artifacts Found

    • gradle/wrapper/gradle-wrapper.jar

    Additional Information This policy is drawn from Security Scorecards, which is a tool that scores a project's adherence to security best practices. You may wish to run a Scorecards scan directly on this repository for more details.


    Allstar has been installed on all Google managed GitHub orgs. Policies are gradually being rolled out and enforced by the GOSST and OSPO teams. Learn more at http://go/allstar

    This issue will auto resolve when the policy is in compliance.

    Issue created by Allstar. See https://github.com/ossf/allstar/ for more information. For questions specific to the repository, please contact the owner or maintainer.

    allstar 
    opened by allstar-app[bot] 23
  • Add some features to CameraView

    Add some features to CameraView

    • [x] upgrade gradle to 4.1
    • [x] upgrade to android 26
    • [x] implement white balance
    • [x] implement zoom
    • [x] implement focusDepth
    • [x] implement record

    this is based on @expo work https://github.com/expo/expo/tree/master/android/cameraview

    the idea is to consume this package on https://github.com/lwansbrough/react-native-camera (check this https://github.com/lwansbrough/react-native-camera/issues/1031)

    cla: yes 
    opened by sibelius 15
  • java.lang.IllegalStateException: Session has been closed; further changes are illegal.

    java.lang.IllegalStateException: Session has been closed; further changes are illegal.

    When calling cameraView.start(); I get the following exception:

    java.lang.IllegalStateException: Session has been closed; further changes are illegal. at android.hardware.camera2.impl.CameraCaptureSessionImpl.checkNotClosed(CameraCaptureSessionImpl.java:606) at android.hardware.camera2.impl.CameraCaptureSessionImpl.setRepeatingRequest(CameraCaptureSessionImpl.java:227) at com.google.android.cameraview.Camera2$3.onConfigured(Camera2.java:132) at java.lang.reflect.Method.invoke(Native Method) at android.hardware.camera2.dispatch.InvokeDispatcher.dispatch(InvokeDispatcher.java:39) at android.hardware.camera2.dispatch.HandlerDispatcher$1.run(HandlerDispatcher.java:65) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6077) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

    Note: I'm not calling it in onResume. Rather after the Camera permisison has been granted.

    bug 
    opened by vanniktech 15
  • Fix crash when click on rotate camera icon + take pic fast

    Fix crash when click on rotate camera icon + take pic fast

    App crashes because session is null but user tries to take pic ==> NPE

    java.lang.NullPointerException: Attempt to invoke virtual method 'int android.hardware.camera2.CameraCaptureSession.capture(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession$CaptureCallback, android.os.Handler)' on a null object reference at com.google.android.cameraview.Camera2.lockFocus(Camera2.java:587) at com.google.android.cameraview.Camera2.takePicture(Camera2.java:338) at com.google.android.cameraview.CameraView.takePicture(CameraView.java:407)

    cla: yes 
    opened by dryaz 13
  • Preview not display in Nougat

    Preview not display in Nougat

    I have Nexus 6P with Nougat OS in it. I have run the demo in this device. But it is not displaying a preview. I have checked the same demo in other OS and devices but it is working there.

    So, I guess the issue is with either Nougat OS support or with the device. But device camera within other app is also working fine. So, finally, the issue is with support for Nougat OS in Nexus 6P. Can you please check that and let me know when the issue gets resolved.

    Sincerely, Shreyash

    opened by ShreyashPromact 12
  • Camera preview not working as fullscreen in Nexus 6P with Nougat OS

    Camera preview not working as fullscreen in Nexus 6P with Nougat OS

    I have raised this issue here in this thread: #85 But as it is suggested to start new thread, I have created this one.

    @ataulm @rajeshct I want you to participate in this and help me to resolved this issue.

    The issue is that, I am not able to see the preview in Nexus 6P with Nougat OS (Here I want to see the preview in full screen only).

    Earlier I have made my camera layout as follow to make it full screen:

    <include
            layout="@layout/include_camera"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>
    

    With this, it was working fine in all the device except Nexus 6p with Nougat OS. After that, I have updated the library and check for the issue. Here the Issue is get resolved but I need to make camera layout as per below code and also need to add AspectRatio to the Camera preview to display in that ratio.

    <include
            layout="@layout/include_camera"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"/>
    

    Now, If I make it to match_parent in height then It will stop showing preview in any device (Not only 6P with Nougat OS). And If I make it wrap_content then, it will show preview, but not in full screen but with the aspect ration of the screen.

    So, here I want to have the full-screen preview of the Camera which was working nicely in old devices (Lower then 6p and Nougat OS).

    I hope you understand the issue I am facing with the update of the library.

    Please help me to resolved this issue.

    opened by ShreyashPromact 10
  • takePicture failed

    takePicture failed

    java.lang.RuntimeException: takePicture failed
    at android.hardware.Camera.native_takePicture(Native Method)
    at android.hardware.Camera.takePicture(Camera.java:1561)
    at com.google.android.cameraview.Camera1.takePictureInternal(Camera1.java:230)
    at com.google.android.cameraview.Camera1$2.onAutoFocus(Camera1.java:221)
    at android.hardware.Camera$EventHandler.handleMessage(Camera.java:1199)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:135)
    at android.app.ActivityThread.main(ActivityThread.java:5593)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:967)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)
    

    Device: Honor SCL-AL00 OS: EMUI3.1.1(Android 5.1.1) other problem:call back onPictureTaken and save picture always.

    Camera1.java

       @Override
        void takePicture() {
            if (!isCameraOpened()) {
                throw new IllegalStateException(
                        "Camera is not ready. Call start() before takePicture().");
            }
            if (getAutoFocus()) {
                mCamera.cancelAutoFocus();
                mCamera.autoFocus(new Camera.AutoFocusCallback() {
                    @Override
                    public void onAutoFocus(boolean success, Camera camera) {
                        takePictureInternal();
                    }
                });
            } else {
                takePictureInternal();
            }
        }
    

    takePictureInternal(); mCamera.cancelAutoFocus(); it is work.

    bug 
    opened by JakeWoki 7
  • Fix for front facing camera images being rotated incorrectly

    Fix for front facing camera images being rotated incorrectly

    • Camera1 API: Split display orientation calculation from camera rotation calculation
    • Adjusted camera rotation to flip when landscape
    • Always apply parameters when opening a camera

    Tested on Samsung S5 (SM_G900A), Moto G (XT1032), Samsung Galaxy Core LTE (SM-G386M)

    cla: yes 
    opened by mkotyk 6
  • adjust image size to fit current view

    adjust image size to fit current view

    When I use a fixed size for the CameraView like in the first picture, i realised the size of the saved photo differs from the displayed in the app

    I came up with a fix to crop the image to only save the portion of the picture the user is really watching in the app. The comparison of the previous saved image and the cropped is show below.

    image

    image

    cla: no 
    opened by alvarosct02 6
  • Null Pointer Exception when capture session is started

    Null Pointer Exception when capture session is started

    I have following exception reported twice from Crashlytics in my app. Attaching device statistics. device statistics

    Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.Surface android.media.ImageReader.getSurface()' on a null object reference at com.google.android.cameraview.Camera2.startCaptureSession(SourceFile:470) at com.google.android.cameraview.Camera2.access$200(SourceFile:50) at com.google.android.cameraview.Camera2$1.onSurfaceTextureAvailable(SourceFile:70) at android.view.TextureView.getHardwareLayer(TextureView.java:370) at android.view.View.updateDisplayListIfDirty(View.java:14076) at android.view.View.getDisplayList(View.java:14122) at android.view.View.draw(View.java:14898) at android.view.ViewGroup.drawChild(ViewGroup.java:3407) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3201) at android.view.View.updateDisplayListIfDirty(View.java:14094) at android.view.View.getDisplayList(View.java:14122) at android.view.View.draw(View.java:14898) at android.view.ViewGroup.drawChild(ViewGroup.java:3407) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3201) at android.view.View.draw(View.java:15177) at android.view.View.updateDisplayListIfDirty(View.java:14099) at android.view.View.getDisplayList(View.java:14122) at android.view.View.draw(View.java:14898) at android.view.ViewGroup.drawChild(ViewGroup.java:3407) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3201) at android.view.View.updateDisplayListIfDirty(View.java:14094) at android.view.View.getDisplayList(View.java:14122) at android.view.View.draw(View.java:14898) at android.view.ViewGroup.drawChild(ViewGroup.java:3407) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3201) at android.view.View.updateDisplayListIfDirty(View.java:14094) at android.view.View.getDisplayList(View.java:14122) at android.view.View.draw(View.java:14898) at android.view.ViewGroup.drawChild(ViewGroup.java:3407) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3201) at android.view.View.updateDisplayListIfDirty(View.java:14094) at android.view.View.getDisplayList(View.java:14122) at android.view.View.draw(View.java:14898) at android.view.ViewGroup.drawChild(ViewGroup.java:3407) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3201) at android.view.View.updateDisplayListIfDirty(View.java:14094) at android.view.View.getDisplayList(View.java:14122) at android.view.View.draw(View.java:14898) at android.view.ViewGroup.drawChild(ViewGroup.java:3407) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3201) at android.view.View.updateDisplayListIfDirty(View.java:14094) at android.view.View.getDisplayList(View.java:14122) at android.view.View.draw(View.java:14898) at android.view.ViewGroup.drawChild(ViewGroup.java:3407) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3201) at android.view.View.draw(View.java:15177) at android.widget.FrameLayout.draw(FrameLayout.java:592) at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2695) at android.view.View.updateDisplayListIfDirty(View.java:14099) at android.view.View.getDisplayList(View.java:14122) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:266) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:272) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:311) at android.view.ViewRootImpl.draw(ViewRootImpl.java:2531) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2367) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1998) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1078) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5885) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767) at android.view.Choreographer.doCallbacks(Choreographer.java:580) at android.view.Choreographer.doFrame(Choreographer.java:550) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5376) at java.lang.reflect.Method.invoke(Method.java) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703)

    opened by ankitbatra11 6
  • Demo app crashes when trying to switch camera  front facing camera

    Demo app crashes when trying to switch camera front facing camera

    here is the log: E/AndroidRuntime: FATAL EXCEPTION: main Process: com.google.android.cameraview.demo, PID: 5552 java.lang.RuntimeException: Camera is being used after Camera.release() was called at android.hardware.Camera.native_getParameters(Native Method) at android.hardware.Camera.getParameters(Camera.java:3337) at android.hardware.Camera.cameraInitVersion(Camera.java:770) at android.hardware.Camera.cameraInitNormal(Camera.java:784) at android.hardware.Camera.(Camera.java:807) at android.hardware.Camera.open(Camera.java:506) at com.google.android.cameraview.Camera1.openCamera(Camera1.java:276) at com.google.android.cameraview.Camera1.start(Camera1.java:89) at com.google.android.cameraview.Camera1.setFacing(Camera1.java:134) at com.google.android.cameraview.CameraView.setFacing(CameraView.java:317) at com.google.android.cameraview.demo.MainActivity.onOptionsItemSelected(MainActivity.java:212) at android.app.Activity.onMenuItemSelected(Activity.java:2940) at android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:361) at android.support.v7.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:195) at android.support.v7.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:108) at android.support.v7.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:108) at android.support.v7.app.ToolbarActionBar$2.onMenuItemClick(ToolbarActionBar.java:65) at android.support.v7.widget.Toolbar$1.onMenuItemClick(Toolbar.java:202) at android.support.v7.widget.ActionMenuView$MenuBuilderCallback.onMenuItemSelected(ActionMenuView.java:780) at android.support.v7.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:822) at android.support.v7.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:171) at android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:973) at android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:963) at android.support.v7.widget.ActionMenuView.invokeItem(ActionMenuView.java:624) at android.support.v7.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:150) at android.view.View.performClick(View.java:4848) at android.view.View$PerformClick.run(View.java:20255) at android.os.Handler.handleCallback(Handler.java:815) at android.os.Handler.dispatchMessage(Handler.java:104) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5643) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

    opened by JoeyZh 0
  • OPPO R17 Redmi 8A  Android 9 crash

    OPPO R17 Redmi 8A Android 9 crash

    java.lang.IllegalArgumentException: Surface was abandoned at android.hardware.camera2.utils.SurfaceUtils.getSurfaceSize(SurfaceUtils.java:89) at android.hardware.camera2.params.OutputConfiguration.(OutputConfiguration.java:260) at android.hardware.camera2.params.OutputConfiguration.(OutputConfiguration.java:145) at android.hardware.camera2.impl.CameraDeviceImpl.createCaptureSession(CameraDeviceImpl.java:546) at com.google.android.cameraview.Camera2.startCaptureSession(Unknown Source:80) at com.google.android.cameraview.Camera2$5.onSurfaceChanged(Unknown Source:2) at com.google.android.cameraview.PreviewImpl.dispatchSurfaceChanged(Unknown Source:2) at com.google.android.cameraview.TextureViewPreview$1.onSurfaceTextureAvailable(Unknown Source:12) at android.view.TextureView.getTextureLayer(TextureView.java:410) at android.view.TextureView.draw(TextureView.java:353) at android.view.View.updateDisplayListIfDirty(View.java:19370) at android.view.View.draw(View.java:20231) at android.view.ViewGroup.drawChild(ViewGroup.java:4454) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4210) at android.view.View.updateDisplayListIfDirty(View.java:19361) at android.view.View.draw(View.java:20231) at android.view.ViewGroup.drawChild(ViewGroup.java:4454) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4210) at android.view.View.updateDisplayListIfDirty(View.java:19361) at android.view.View.draw(View.java:20231) at android.view.ViewGroup.drawChild(ViewGroup.java:4454) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4210) at android.view.View.draw(View.java:20506) at android.view.View.updateDisplayListIfDirty(View.java:19370) at android.view.View.draw(View.java:20231) at android.view.ViewGroup.drawChild(ViewGroup.java:4454) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4210) at android.view.View.updateDisplayListIfDirty(View.java:19361) at android.view.View.draw(View.java:20231) at android.view.ViewGroup.drawChild(ViewGroup.java:4454) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4210) at android.view.View.updateDisplayListIfDirty(View.java:19361) at android.view.View.draw(View.java:20231) at android.view.ViewGroup.drawChild(ViewGroup.java:4454) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4210) at android.view.View.updateDisplayListIfDirty(View.java:19361) at android.view.View.draw(View.java:20231) at android.view.ViewGroup.drawChild(ViewGroup.java:4454) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4210) at android.view.View.updateDisplayListIfDirty(View.java:19361) at android.view.View.draw(View.java:20231) at android.view.ViewGroup.drawChild(ViewGroup.java:4454) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4210) at android.view.View.draw(View.java:20506) at com.android.internal.policy.DecorView.draw(DecorView.java:913) at android.view.View.updateDisplayListIfDirty(View.java:19370) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:690) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:696) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:805) at android.view.ViewRootImpl.draw(ViewRootImpl.java:3990) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3741) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3036) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1874) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8141) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1146) at android.view.Choreographer.doCallbacks(Choreographer.java:957) at android.view.Choreographer.doFrame(Choreographer.java:884) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1132) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:227) at android.app.ActivityThread.main(ActivityThread.java:7279) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:575) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:908) Caused by: android.hardware.camera2.legacy.LegacyExceptionUtils$BufferQueueAbandonedException at android.hardware.camera2.legacy.LegacyExceptionUtils.throwOnError(LegacyExceptionUtils.java:73) at android.hardware.camera2.legacy.LegacyCameraDevice.getSurfaceSize(LegacyCameraDevice.java:606) at android.hardware.camera2.utils.SurfaceUtils.getSurfaceSize(SurfaceUtils.java:87) ... 64 more android.hardware.camera2.legacy.LegacyExceptionUtils$BufferQueueAbandonedException at android.hardware.camera2.legacy.LegacyExceptionUtils.throwOnError(LegacyExceptionUtils.java:73) at android.hardware.camera2.legacy.LegacyCameraDevice.getSurfaceSize(LegacyCameraDevice.java:606) at android.hardware.camera2.utils.SurfaceUtils.getSurfaceSize(SurfaceUtils.java:87) at android.hardware.camera2.params.OutputConfiguration.(OutputConfiguration.java:260) at android.hardware.camera2.params.OutputConfiguration.(OutputConfiguration.java:145) at android.hardware.camera2.impl.CameraDeviceImpl.createCaptureSession(CameraDeviceImpl.java:546) at com.google.android.cameraview.Camera2.startCaptureSession(Unknown Source:80) at com.google.android.cameraview.Camera2$5.onSurfaceChanged(Unknown Source:2) at com.google.android.cameraview.PreviewImpl.dispatchSurfaceChanged(Unknown Source:2) at com.google.android.cameraview.TextureViewPreview$1.onSurfaceTextureAvailable(Unknown Source:12) at android.view.TextureView.getTextureLayer(TextureView.java:410) at android.view.TextureView.draw(TextureView.java:353) at android.view.View.updateDisplayListIfDirty(View.java:19370) at android.view.View.draw(View.java:20231) at android.view.ViewGroup.drawChild(ViewGroup.java:4454) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4210) at android.view.View.updateDisplayListIfDirty(View.java:19361) at android.view.View.draw(View.java:20231) at android.view.ViewGroup.drawChild(ViewGroup.java:4454) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4210) at android.view.View.updateDisplayListIfDirty(View.java:19361) at android.view.View.draw(View.java:20231) at android.view.ViewGroup.drawChild(ViewGroup.java:4454) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4210) at android.view.View.draw(View.java:20506) at android.view.View.updateDisplayListIfDirty(View.java:19370) at android.view.View.draw(View.java:20231) at android.view.ViewGroup.drawChild(ViewGroup.java:4454) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4210) at android.view.View.updateDisplayListIfDirty(View.java:19361) at android.view.View.draw(View.java:20231) at android.view.ViewGroup.drawChild(ViewGroup.java:4454) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4210) at android.view.View.updateDisplayListIfDirty(View.java:19361) at android.view.View.draw(View.java:20231) at android.view.ViewGroup.drawChild(ViewGroup.java:4454) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4210) at android.view.View.updateDisplayListIfDirty(View.java:19361) at android.view.View.draw(View.java:20231) at android.view.ViewGroup.drawChild(ViewGroup.java:4454) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4210) at android.view.View.updateDisplayListIfDirty(View.java:19361) at android.view.View.draw(View.java:20231) at android.view.ViewGroup.drawChild(ViewGroup.java:4454) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4210) at android.view.View.draw(View.java:20506) at com.android.internal.policy.DecorView.draw(DecorView.java:913) at android.view.View.updateDisplayListIfDirty(View.java:19370) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:690) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:696) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:805) at android.view.ViewRootImpl.draw(ViewRootImpl.java:3990) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3741) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3036) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1874) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8141) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1146) at android.view.Choreographer.doCallbacks(Choreographer.java:957) at android.view.Choreographer.doFrame(Choreographer.java:884) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1132) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:227) at android.app.ActivityThread.main(ActivityThread.java:7279) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:575) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:908)

    opened by BoomSix 0
  • Exit Interface always returns 0 for Google pixel with Google camera

    Exit Interface always returns 0 for Google pixel with Google camera

    I am developing an application in which I capture and upload images.

    What I have observed is the Camera intent is always turning the photos captured in portrait to landscape on Google Pixel running Google Camera app.

    I have been through almost 20-30 searches which says the same thing, i.e. use ExifInterface or the Cursor. Using ExifInterface class is always returning 0 orientation and Cursor cannot find any value for column.

    This is so annoying. This is such a basic feature, people should not have trouble with it.

    In order to reproduce the issue you need to install Google camera app on the emulator and when using Camera intent select the Google camera from the bottom sheet.

    I am stuck with this for a month now. Tired of working on other parts while prototyping.

    opened by nayan-dhabarde 0
  • android.view.TextureView.onSizeChanged (TextureView.java:367)

    android.view.TextureView.onSizeChanged (TextureView.java:367)

    i got error on device Redmi Note 8

    this is an error

    Fatal Exception: java.lang.RuntimeException Failed to start camera session com.google.android.cameraview.Camera2.startCaptureSession (Camera2.java:654) com.google.android.cameraview.Camera2$5.onSurfaceChanged (Camera2.java:235) com.google.android.cameraview.PreviewImpl.dispatchSurfaceChanged (PreviewImpl.java:54) com.google.android.cameraview.TextureViewPreview$1.onSurfaceTextureSizeChanged (TextureViewPreview.java:51) android.view.TextureView.onSizeChanged (TextureView.java:367) android.view.View.sizeChange (View.java:20875) android.view.View.setFrame (View.java:20836) android.view.View.layout (View.java:20696) android.widget.FrameLayout.layoutChildren (FrameLayout.java:323) android.widget.FrameLayout.onLayout (FrameLayout.java:261) android.view.View.layout (View.java:20699) android.view.ViewGroup.layout (ViewGroup.java:6198) android.widget.RelativeLayout.onLayout (RelativeLayout.java:1083) android.view.View.layout (View.java:20699) android.view.ViewGroup.layout (ViewGroup.java:6198) android.widget.FrameLayout.layoutChildren (FrameLayout.java:323) android.widget.FrameLayout.onLayout (FrameLayout.java:261) android.view.View.layout (View.java:20699) android.view.ViewGroup.layout (ViewGroup.java:6198) android.widget.LinearLayout.setChildFrame (LinearLayout.java:1812) android.widget.LinearLayout.layoutVertical (LinearLayout.java:1656) android.widget.LinearLayout.onLayout (LinearLayout.java:1565) android.view.View.layout (View.java:20699) android.view.ViewGroup.layout (ViewGroup.java:6198) android.widget.FrameLayout.layoutChildren (FrameLayout.java:323) android.widget.FrameLayout.onLayout (FrameLayout.java:261) android.view.View.layout (View.java:20699) android.view.ViewGroup.layout (ViewGroup.java:6198) android.widget.LinearLayout.setChildFrame (LinearLayout.java:1812) android.widget.LinearLayout.layoutVertical (LinearLayout.java:1656) android.widget.LinearLayout.onLayout (LinearLayout.java:1565) android.view.View.layout (View.java:20699) android.view.ViewGroup.layout (ViewGroup.java:6198) android.widget.FrameLayout.layoutChildren (FrameLayout.java:323) android.widget.FrameLayout.onLayout (FrameLayout.java:261) com.android.internal.policy.DecorView.onLayout (DecorView.java:757) android.view.View.layout (View.java:20699) android.view.ViewGroup.layout (ViewGroup.java:6198) android.view.ViewRootImpl.performLayout (ViewRootImpl.java:2844) android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:2361) android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1506) android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:7351) android.view.Choreographer$CallbackRecord.run (Choreographer.java:1044) android.view.Choreographer.doCallbacks (Choreographer.java:839) android.view.Choreographer.doFrame (Choreographer.java:774) android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:1030) android.os.Handler.handleCallback (Handler.java:873) android.os.Handler.dispatchMessage (Handler.java:99) android.os.Looper.loop (Looper.java:201) android.app.ActivityThread.main (ActivityThread.java:6864) java.lang.reflect.Method.invoke (Method.java) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:547) com.android.internal.os.ZygoteInit.main (ZygoteInit.java:873)

    anyone help me ?

    opened by iqbalprabu 0
  • TakePicture flash problem

    TakePicture flash problem

    On Huawei mobile phones, the flash is on, sometimes the flash only flashes once when taking pictures, sometimes flashes twice.

    previewRequestBuilder.set(CaptureRequest.CONTROL_AE_MODE, CaptureRequest.CONTROL_AE_MODE_ON_ALWAYS_FLASH);

    previewRequestBuilder.set(CaptureRequest.FLASH_MODE, CaptureRequest.FLASH_MODE_OFF);

    opened by yanerly 0
Owner
Google
Google ❤️ Open Source
Google
A mod of the Twitch Android Mobile App adding BetterTTV and FrankerFaceZ emotes

A mod of the Twitch Android Mobile App adding BetterTTV and FrankerFaceZ emotes

null 377 Jan 2, 2023
A solution for streaming H.264, H.263, AMR, AAC using RTP on Android

Introduction What it does libstreaming is an API that allows you, with only a few lines of code, to stream the camera and/or microphone of an android

Simon 3.3k Dec 30, 2022
[] FFmpeg build for android random architectures with example jni

AndroidFFmpegLibrary This project aims to create working library providing playing video files in android via ffmpeg libraries. With some effort and N

AppUnite Sp. z o.o. Spk. 1k Mar 1, 2021
a system for building custom ffmpeg binaries for Android

This is a new android-ffmpeg project since it seems there were so many different ways of doing it, it was confusing. So here is my clean, easily chan

Guardian Project 967 Nov 12, 2022
Android Java wrapper around ffmpeg command line binary

FFMPEG Library for Android This project is a Java wrapper around an ffmpeg command line binary for use in Android applications. It depends on the andr

Guardian Project 555 Dec 5, 2022
MJPEG video streaming on Android

ipcam-view Android MJPEG video streaming made simple! A wrapper library around the well known SimpleMjpegView and android-camera-axis projects. If you

null 359 Jan 6, 2023
script(s) to build ffmpeg for android, including support for RTMP (and OpenSSL)

android-ffmpeg-with-rtmp This repository contains script(s) to build ffmpeg for android with RTMP (and OpenSSL) support. Instructions Install the Andr

cine.io 234 Dec 28, 2022
Script and Instructions for building FFmpeg for Android

FFmpeg-Android Herein lies scripts and instructions for compiling FFmpeg for Android with RTMP support. Much thanks to Chris Ballinger and Liu Feipeng

David Brodsky 80 Dec 13, 2022
Android/iOS video player based on FFmpeg n3.4, with MediaCodec, VideoToolbox support.

ijkplayer Platform Build Status Android iOS Video player based on ffplay Download Android: Gradle # required allprojects { repositories {

bilibili 28.9k May 26, 2021
android video player base on ijkplayer

GiraffePlayer NOTE:this project is no longer update please using improved GiraffePlayer2 ,for flutter please visit GPlayer out of the box android vide

tom 683 Nov 14, 2022
Android MoveNet single human pose estimation by ncnn

Android MoveNet single human pose estimation by ncnn

FeiGeChuanShu 93 Dec 31, 2022
MiStoryView is a simple configurable library to integrate stories features into your social media android application.

MiStoryView MiStoryView is a simple configurable library to integrate stories features into your social media android application. Preview Key feature

MindInventory 35 Dec 22, 2022
Space Navigation is a library allowing easily integrate fully customizable Google Spaces like navigation to your app.

Space-Navigation-View Introduction Space Navigation is a library allowing easily integrate fully customizable Google [Spaces][1] like navigation to yo

Arman 2k Dec 23, 2022
This a Ride User app in which in integrate almost every features of a Ride Share app.

My-Ride-App This a Ride app(User) in which I integrate almost every features of a Ride Share app. Here I use kotlin programing language, Google map SD

Khairul Islam 5 Apr 27, 2022
Plugin to integrate EventStoreDB into Ktor-Server!

Ktor Plugin EventStoreDB EventStoreDB is an open-source database technology that stores your critical data in streams of immutable events. It was buil

null 7 Sep 1, 2022
Camera Folder: "Take a Photo from Camera" everywhere where you can open a photo file

When "Camera Folder" is installed many Android-Apps that can open jpg files can also take a photo from camera.

k3b 18 Dec 20, 2022
Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your development.

Bubbles for Android Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your

Txus Ballesteros 1.5k Jan 2, 2023
Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your development.

Bubbles for Android Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your

Txus Ballesteros 1.5k Jan 2, 2023
An android library to easily add circular progress bar into your Jetpack Compose apps.

CircularProgressBar for Jetpack Compose An android library to easily add circular progress bar into your Jetpack Compose apps. Have a Look Usage Circu

Hitanshu Dhawan 38 Oct 30, 2022
Easy Android camera integration, advanced features.

CameraViewEx This is an extended version of Google's cameraview library with better stability and many more features. CameraViewEx highly simplifies i

Priyank Vasa 205 Dec 24, 2022