Hi when I change initialCameraType to front camera the app opens. but I get a crash and image freeze.
Can you help?
Thanks
W/System.err(16747): java.lang.RuntimeException: setParameters failed
W/System.err(16747): at android.hardware.Camera.native_setParameters(Native Method)
W/System.err(16747): at android.hardware.Camera.setParameters(Camera.java:2117)
W/System.err(16747): at com.ric.adv_camera.AdvCamera.refreshCameraPreview(AdvCamera.java:606)
W/System.err(16747): at com.ric.adv_camera.AdvCamera.refreshCamera(AdvCamera.java:595)
W/System.err(16747): at com.ric.adv_camera.AdvCamera.surfaceChanged(AdvCamera.java:528)
W/System.err(16747): at android.view.SurfaceView.updateSurface(SurfaceView.java:972)
W/System.err(16747): at android.view.SurfaceView$2.onPreDraw(SurfaceView.java:218)
W/System.err(16747): at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:1119)
W/System.err(16747): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3336)
W/System.err(16747): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2225)
W/System.err(16747): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9126)
W/System.err(16747): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:999)
W/System.err(16747): at android.view.Choreographer.doCallbacks(Choreographer.java:797)
W/System.err(16747): at android.view.Choreographer.doFrame(Choreographer.java:732)
W/System.err(16747): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:984)
W/System.err(16747): at android.os.Handler.handleCallback(Handler.java:883)
W/System.err(16747): at android.os.Handler.dispatchMessage(Handler.java:100)
W/System.err(16747): at android.os.Looper.loop(Looper.java:237)
W/System.err(16747): at android.app.ActivityThread.main(ActivityThread.java:8167)
W/System.err(16747): at java.lang.reflect.Method.invoke(Native Method)
W/System.err(16747): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
W/System.err(16747): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
E/DecorView(16747): mWindow.mActivityCurrentConfig is null
Hi when I change initialCameraType to front camera the app opens. but I get a crash and image freeze. Can you help? Thanks W/System.err(16747): java.lang.RuntimeException: setParameters failed W/System.err(16747): at android.hardware.Camera.native_setParameters(Native Method) W/System.err(16747): at android.hardware.Camera.setParameters(Camera.java:2117) W/System.err(16747): at com.ric.adv_camera.AdvCamera.refreshCameraPreview(AdvCamera.java:606) W/System.err(16747): at com.ric.adv_camera.AdvCamera.refreshCamera(AdvCamera.java:595) W/System.err(16747): at com.ric.adv_camera.AdvCamera.surfaceChanged(AdvCamera.java:528) W/System.err(16747): at android.view.SurfaceView.updateSurface(SurfaceView.java:972) W/System.err(16747): at android.view.SurfaceView$2.onPreDraw(SurfaceView.java:218) W/System.err(16747): at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:1119) W/System.err(16747): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3336) W/System.err(16747): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2225) W/System.err(16747): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9126) W/System.err(16747): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:999) W/System.err(16747): at android.view.Choreographer.doCallbacks(Choreographer.java:797) W/System.err(16747): at android.view.Choreographer.doFrame(Choreographer.java:732) W/System.err(16747): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:984) W/System.err(16747): at android.os.Handler.handleCallback(Handler.java:883) W/System.err(16747): at android.os.Handler.dispatchMessage(Handler.java:100) W/System.err(16747): at android.os.Looper.loop(Looper.java:237) W/System.err(16747): at android.app.ActivityThread.main(ActivityThread.java:8167) W/System.err(16747): at java.lang.reflect.Method.invoke(Native Method) W/System.err(16747): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496) W/System.err(16747): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100) E/DecorView(16747): mWindow.mActivityCurrentConfig is null