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

Device id (camera id) gets changed in android app webview #58

Open
aminurrashid opened this issue Jun 10, 2020 · 1 comment
Open

Device id (camera id) gets changed in android app webview #58

aminurrashid opened this issue Jun 10, 2020 · 1 comment

Comments

@aminurrashid
Copy link

Describe the bug
I'm developing an android app, which has a webview in it. When loading the qr scanning demo page (https://blog.minhazav.dev/research/html5-qrcode.html) or a page that implemented the html5-qrcode library, device id (camera id) gets changed every time I reload the webpage, where as in mobile browser or desktop browser the device id remains same. In my app I like to save user's preferred camera which requires an unique id, but as the id gets changed when the webpage is reloaded it's not possible.

sample:
1st load:
id: "4c2c562185edeff69ceb28984aec24160b359fc3567422065818a41e4070f60c"
label: ""
2nd load:
id: "66a9bae5d6fdf95016203d260be74cff7b0e96deb14c91d768851353d4d3461b"
label: ""
3rd load:
id: "52dd763ec80c3e48726ab7617e2e37444278d90abd768414468a16f8e7728c0e"
label: ""

To Reproduce
Steps to reproduce the behavior:

  1. Load https://blog.minhazav.dev/research/html5-qrcode.html in android webview
  2. Check loaded devices array from remote debugging of chrome developer console by running following code in console: Html5Qrcode.getCameras().then(devices => {console.log(devices);});

Expected behavior
Device id should be unique for same device.

Smartphone (please complete the following information):

  • Device: Nexus 6P
  • OS: android 8.1.0
@la23jr21
Copy link

I encountered the same issue. May I know what's best to fix this? Any tips for me to proceed?

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

No branches or pull requests

3 participants