87
Views
4
Comments
[Barcode Plugin] ZXing is a thing of the past, we should be using Google MLKit
barcode-plugin
Mobile icon
Forge asset by OutSystems
Application Type
Mobile

This plugin uses a ZXing plugin which has a lot of issues identifying barcodes in weird light or non optimal scenarios (outside for example).
I did a few tests with a plugin using Google MLKit (https://github.com/FredTSousa/cordova-plugin-ia-mlkit-scanner) and the difference is really day and night. The issue is that the google MLKit has some internal dependencies with firebase and I can't seem to be able to make the app build together with the supported firebasemobile plugin.


I was able to build the plugin together with the OneSignal one after a few changes on the gradle but then i get a different issue on runtime.


This ZXing plugin is giving us really problematic incidents on production due to misreading barcodes, and it would be great if OutSystems would take some time into updating this old plugin into a more normal version of a barcode reader, the performance of this is very subpar to other regular applications nowadays.

The performance of the MLKit plugin on an outsystems app is much better.

2016-04-22 00-29-45
Nuno Reis
 
MVP

I agree ZXing is not ideal, but you have several QRCode generator/reader components in Forge so this doesn't seem a priority. it is an Idea.

Can you specify where this is a serious issue?

2021-03-24 17-29-38
Frederico Sousa
Champion

Hello, sorry for not answering before.


All other QRCode Readers available use Phonegap or ZXing plugin, and even Phonegap uses ZXing library so in the end its all ZXing.
ZXing is great for barcodes with perfect conditions in good lighting but its not even comparable with whats available on the market in other apps outside outsystems for anything else. 


I've included a forge component that I just developed to showcase the difference between both.
You can use the following image to test with both plugins (both available on that app) and even test whatever barcodes you can find online. You can use the Try Now to test on your device.

This component is able to use the MLKit but the moment i include any supported forge component, the build fails due to duplicated library dependencies. I've done my best in going around those but wasn't sucessful.

Google MLKit Test Component

2021-03-24 17-29-38
Frederico Sousa
Champion

Another example (from random searches online).
(open each one in a new tab and just point your device to it)

2025-09-14 00-49-27
Hideto Horiuchi

We are struggling with the poor read accuracy of the ZXing library. If the reading accuracy can be improved, we hope that Google MLKit will be supported.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.