Closed anamauad closed 1 year ago
unlockFocus cannot be called if you didn't take a photo. So I think the scenario is wrong. Can you double-check the scenario, please?
@anamauad
I've updated the scenario.
* what is your compileSdkVersion in your build.gradle * what is your targetSdkVersion in your build.gradle
It is crashing also on the following devices:
Brand | Model | OS | Notes |
---|---|---|---|
Samsung | Galaxy A10, A21s, J4, J6, S9 | Android 10 | 20 times in the last 7 days |
Samsung | Galaxy A10, S8, S8+ | Android 9 | 10 times in the last 7 days |
Motorola | E6 plus, Z Play | Android 9 | 2 times in the last 7 days |
In response to your question "unlockFocus cannot be called if you didn't take a photo.", it crashes the app right after pressing the shutter button.
We are having this error on Xiaomi Redmi 9A
Fatal Exception: java.lang.IllegalStateException: Session has been closed; further changes are illegal. at android.hardware.camera2.impl.CameraCaptureSessionImpl.checkNotClosed(CameraCaptureSessionImpl.java:834) at android.hardware.camera2.impl.CameraCaptureSessionImpl.capture(CameraCaptureSessionImpl.java:164) at com.apparence.camerawesome.CameraPreview.unlockFocus(CameraPreview.java:31) at com.apparence.camerawesome.CameraPreview.onStateChanged(CameraPreview.java:36) at com.apparence.camerawesome.CameraSession.setState(CameraSession.java:22) at com.apparence.camerawesome.CameraPicture$2.onCaptureCompleted(CameraPicture.java:47) at android.hardware.camera2.impl.CameraCaptureSessionImpl$1.lambda$onCaptureCompleted$3$CameraCaptureSessionImpl$1(CameraCaptureSessionImpl.java:640) at android.hardware.camera2.impl.-$$Lambda$CameraCaptureSessionImpl$1$OA1Yz_YgzMO8qcV8esRjyt7ykp4.run(-.java:8) at android.os.Handler.handleCallback(Handler.java:914) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:225) at android.app.ActivityThread.main(ActivityThread.java:7563) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:994)
This should be fixed with the reworked version #150
Steps to Reproduce
Expected results
Actual results
About your device
Google Play Console Log
``` java.lang.IllegalStateException: at android.hardware.camera2.impl.CameraCaptureSessionImpl.checkNotClosed (CameraCaptureSessionImpl.java:834) at android.hardware.camera2.impl.CameraCaptureSessionImpl.capture (CameraCaptureSessionImpl.java:164) at com.apparence.camerawesome.CameraPreview.unlockFocus (CameraPreview.java:31) at com.apparence.camerawesome.CameraPreview.a (CameraPreview.java:36) at com.apparence.camerawesome.CameraSession.a (CameraSession.java:22) at com.apparence.camerawesome.CameraPicture$2.onCaptureCompleted (CameraPicture.java:47) at android.hardware.camera2.impl.CameraCaptureSessionImpl$1.lambda$onCaptureCompleted$3$CameraCaptureSessionImpl$1 (CameraCaptureSessionImpl.java:640) at android.hardware.camera2.impl.-$$Lambda$CameraCaptureSessionImpl$1$OA1Yz_YgzMO8qcV8esRjyt7ykp4.run (Unknown Source:8) at android.os.Handler.handleCallback (Handler.java:914) at android.os.Handler.dispatchMessage (Handler.java:100) at android.os.Looper.loop (Looper.java:225) at android.app.ActivityThread.main (ActivityThread.java:7563) at java.lang.reflect.Method.invoke (Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:539) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:994) ```