Scandit / datacapture-android-samples

27 stars 22 forks source link

Camera preview not showing #6

Closed Shyamlalkumawat closed 3 years ago

Shyamlalkumawat commented 3 years ago

While switching the camera position from front and back with single data captures instance then following error faced

Sdk-core: either the camera object has been released or a hardware or other low-level error occurred

System.err- java.lang.RuntimeExcetion: start preview failed

at android.hardware.Camera.startPreview(NativeMethod) at com. Scandit. Datacapture.core.internal.module.source.a.a(SourceFile:4189)

at com. Scandit. Datacapture.core.internal.module.source.a.$b.handleMessage(SourceFile:136)

at android.os.handler.dispatchMessage(Handler.java)

Please let us know why this error exception occurred.

We are using camera in different screen with same datacapture instance

ScanditSupport commented 3 years ago

Hi @Shyamlalkumawat,

we've tested the camera switching but couldn't identify an issue.

Could you please reach out to us direct via https://support.scandit.com/hc/en-us/requests/new and share a code snippet of your camera switching? It might be related to the frame source not being stopped prior to switching the camera.

Best regards Your Scandit Support Team