Skip to content
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

Cordova Android app #543

Open
GulharaKam opened this issue Nov 29, 2023 · 1 comment
Open

Cordova Android app #543

GulharaKam opened this issue Nov 29, 2023 · 1 comment

Comments

@GulharaKam
Copy link

Scan

Hello, I am using the ZXingScanner in an Android application through Cordova. I have the permissions , and the plugins cordova-plugin-camera and cordova-plugin-android-permissions are installed. Although the image appears, the ZXingScanner is not functioning on Android, and the camera does not respond. However, there are no issues in the browser. Please help me identify the problem.

Scan

@maatien
Copy link

maatien commented Sep 20, 2024

Hi, I've got a similar problem with a Capacitor based app on Android. The "video play image" appears for a few seconds until the camera is fully initialized, then the video preview is displayed correctly.

2024-09-20 16:14:57.713 31249-31632 cr_VideoCapture         my.video.app                      E  CameraDevice.StateCallback onOpened
2024-09-20 16:14:58.021 31249-31632 my.video.app            my.video.app                      W  Attempt to remove non-JNI local reference
2024-09-20 16:14:58.026 31249-31343 cr_media                my.video.app                      W  Requires MODIFY_AUDIO_SETTINGS and RECORD_AUDIO. No audio device will be available for recording
2024-09-20 16:14:58.143 31249-31249 Capacitor/Console       my.video.app                      I  File: http://localhost/chunk-UDCQAGSZ.js - Line 23 - Msg: camerasFoundHandler [object Object],[object Object]
2024-09-20 16:14:58.158 31249-31249 Capacitor/Console       my.video.app                      I  File: http://localhost/chunk-UDCQAGSZ.js - Line 23 - Msg: autostartedHandler undefined
2024-09-20 16:14:58.161 31249-31249 Capacitor/Console       my.video.app                      W  File: http://localhost/chunk-UDCQAGSZ.js - Line 23 - Msg: Setting the same device is not allowed.
2024-09-20 16:14:58.999 31249-31676 cr_VideoCapture         my.video.app                      E  CameraDevice.StateCallback onOpened
2024-09-20 16:14:59.557 31249-31676 my.video.app            my.video.app                      W  Attempt to remove non-JNI local reference
2024-09-20 16:14:59.607 31249-31249 Capacitor/Console       my.video.app                      I  File: http://localhost/chunk-UDCQAGSZ.js - Line 23 - Msg: onTorchCompatible true

In the corresponding log, "CameraDevice.StateCallback onOpened" is called twice and the video preview stream is only available after the second call.

On iOS and Web the problem doen't occur.

Does anyone has any recommendations how to handle this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants