New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On Android 6.0 camera does not start #25
Comments
I have found the cause of the problem, |
Great to hear! |
if user did't give the permission of the camera can prew but can not record video |
Can somebody tell me how request permission for the activity? Because i'm asking and nothing changes. The "request" popup appears, i'm accepting and same "Camera in use" message appears. Basically i'm using this in my MainActivity
I was having this trouble with the android default service to record videos, but my permission fixed the problem. |
Android4.4.2,It runs normally.
on Android6.0 ,Exception:Camera disabled or in use by other process
Here is the log:
W/System.err: java.lang.RuntimeException: Fail to connect to camera service
W/System.err: at android.hardware.Camera.(Camera.java:542)
W/System.err: at android.hardware.Camera.open(Camera.java:397)
W/System.err: at com.jmolsmobile.landscapevideocapture.camera.NativeCamera.openNativeCamera(NativeCamera.java:27)
W/System.err: at com.jmolsmobile.landscapevideocapture.camera.CameraWrapper.openCamera(CameraWrapper.java:54)
W/System.err: at com.jmolsmobile.landscapevideocapture.recorder.VideoRecorder.initializeCameraAndPreview(VideoRecorder.java:63)
W/System.err: at com.jmolsmobile.landscapevideocapture.recorder.VideoRecorder.(VideoRecorder.java:58)
W/System.err: at com.jmolsmobile.landscapevideocapture.VideoCaptureActivity.initializeRecordingUI(VideoCaptureActivity.java:83)
W/System.err: at com.jmolsmobile.landscapevideocapture.VideoCaptureActivity.onCreate(VideoCaptureActivity.java:71)
W/System.err: at android.app.Activity.performCreate(Activity.java:6303)
W/System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
W/System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2374)
W/System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2481)
W/System.err: at android.app.ActivityThread.access$900(ActivityThread.java:153)
W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1349)
W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
W/System.err: at android.os.Looper.loop(Looper.java:148)
W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5432)
W/System.err: at java.lang.reflect.Method.invoke(Native Method)
W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:735)
W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
E/VideoCapture_Exception: Unable to open camera - Camera disabled or in use by other process
W/System.err: com.jmolsmobile.landscapevideocapture.camera.OpenCameraException: Camera disabled or in use by other process
W/System.err: at com.jmolsmobile.landscapevideocapture.camera.CameraWrapper.openCamera(CameraWrapper.java:57)
W/System.err: at com.jmolsmobile.landscapevideocapture.recorder.VideoRecorder.initializeCameraAndPreview(VideoRecorder.java:63)
W/System.err: at com.jmolsmobile.landscapevideocapture.recorder.VideoRecorder.(VideoRecorder.java:58)
W/System.err: at com.jmolsmobile.landscapevideocapture.VideoCaptureActivity.initializeRecordingUI(VideoCaptureActivity.java:83)
W/System.err: at com.jmolsmobile.landscapevideocapture.VideoCaptureActivity.onCreate(VideoCaptureActivity.java:71)
W/System.err: at android.app.Activity.performCreate(Activity.java:6303)
W/System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
W/System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2374)
W/System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2481)
W/System.err: at android.app.ActivityThread.access$900(ActivityThread.java:153)
W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1349)
W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
W/System.err: at android.os.Looper.loop(Looper.java:148)
W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5432)
W/System.err: at java.lang.reflect.Method.invoke(Native Method)
W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:735)
W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
The text was updated successfully, but these errors were encountered: