web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

QR scanner - camera Focus not working when scanning the code from mobile devices.

(0) ShareShare
ReportReport
Posted on by 5
I've implemented a HTML5 QR Code scanner to read a QR code on a web application When clicked on the scan button, the camera opens and starts to scan.

As long as the QR code is placed at the right distance from the camera or the image is HD, the scanner scans the code and gives the output.

But, if the QR code image is not clear or it's resolution is low, the camera needs to focus onto to the qr code and scan the image - which is not happening. Instead it gives an error message - ' no qr codes found to scan'.

The default QR scanner in the mobile devices, works exactly as expected; it scans the qr code even if the resolution is low, it auto focuses onto the code and gives the output.

I would want to make my QR scanner work similar to that of a default mobile device QR scanner, where in it auto focuses onto the image to scan and give output.

Any suggestions would be much appreciated. Thank you.

I have the same question (0)
  • Chandrakant Machhi Profile Picture
    10 on at

    Hello Lalith, if you are using D365 online and can use Power Platform;

    You have a possibility to use Barcode scanner control in PowerApps.

    docs.microsoft.com/.../control-new-barcode-scanner

    Else in general web application, you may refer and compare your solution with other implementations:

    github.com/.../html5-qrcode

    blog.minhazav.dev/.../html5-qrcode

    to find potential gaps.

    Thanks.

  • Lalith Aditya Profile Picture
    5 on at

    Hi Chandrakant

    Yes, I am using D365 online and I am aware of the barcode scanner control in Power apps.

    But the scanner feature I want to include is in the portal(a web application), which doesn't support PCF controls.

    (I tried this at the start of development but couldn't achieve the desired output)

    I have used the same documents that you have mentioned to develop my present qr code scanner and still going through the same, in search of anything related.

    The library that I am using 'html5-qrcode', doesn't have a feature to enhance the focus of the camera, similar to a native scanner in mobile. May be the library owner hasn't included it, yet.

    Thank you for your time, Chandrakant.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 61

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 52 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans