Android Question Barcode detection with Google's Mobile Vision API?

jo1234

Active Member
Licensed User
Longtime User
Hi,

Android contains since last summer the Google Play Mobile Vision API, which allows native barcode detection.

Documentation: https://developers.google.com/vision/barcodes-overview
Example: https://github.com/googlesamples/android-vision

Has anyone used this API?
Could anyone please make an library to use it from B4A?
I think that could be very helpful for many users!

I know there are already barcode scanner options in B4A.
So far I use the ABZxing library, which is very fast for 1D barcodes, but can only be used in landscape mode and requires the Zxing app.
I also tested Johan Schoeman's barcode scanner library, which can be used in portrait mode and as standalone. However, it was verrrrrry slow for 1D codes in portrait mode and therefore no option for scanning many barcodes.

Moreover, I always prefer to use a native API rather than a third-party solution because it gives me a better feeling about continued support...

Thanks a lot,
John
 

Johan Schoeman

Expert
Licensed User
Longtime User
Hi,

Android contains since last summer the Google Play Mobile Vision API, which allows native barcode detection.

Documentation: https://developers.google.com/vision/barcodes-overview
Example: https://github.com/googlesamples/android-vision

Has anyone used this API?
Could anyone please make an library to use it from B4A?
I think that could be very helpful for many users!

I know there are already barcode scanner options in B4A.
So far I use the ABZxing library, which is very fast for 1D barcodes, but can only be used in landscape mode and requires the Zxing app.
I also tested Johan Schoeman's barcode scanner library, which can be used in portrait mode and as standalone. However, it was verrrrrry slow for 1D codes in portrait mode and therefore no option for scanning many barcodes.

Moreover, I always prefer to use a native API rather than a third-party solution because it gives me a better feeling about continued support...

Thanks a lot,
John
It all depends on what barcode scanner library you have tested and how you have tested it...I have had no problem scanning any 1D or 2D barcode with any of the barcode scanning libs that I have made available in the forum. They all work perfectly well and most of them make use of the ZXiNG scanner/decoder engine. Some of them are used in apps that have been published on Google Play https://play.google.com/store/apps/details?id=qrcode.id.desenvolvimento
 
Last edited:
Upvote 0

jo1234

Active Member
Licensed User
Longtime User
Hi Johan,

thanks a lot for your response.
I tested your b4aZXscannerLiveView sample on a Moto G (1st gen) and a Nexus 5.
The problem are 1D codes (Interleaved 2 of 5). I get a much faster recognition by the ZXing app (ABZxing library) than with the b4aZXscannerLiveView sample. And speed and reliability are critical for my project.

The difference is of course, that the ZXing app only recognizes 1D barcodes that are aligned with its red "laser line", while your library recoginzes 1D barcodes in all orientations. Maybe that is the speed advantage, because searching only for barcode patterns along the laser line is much easier that looking for patterns in all directions.
Could that restriction be implemented in your library?

When reading about this topic I realized that there is the build-in Google Play Mobile Vision API and was wondering whether this might be an option for fast 1D barcode detection.

thanks a lot,
John
 
Upvote 0

Johan Schoeman

Expert
Licensed User
Longtime User
Hi Johan,

thanks a lot for your response.
I tested your b4aZXscannerLiveView sample on a Moto G (1st gen) and a Nexus 5.
The problem are 1D codes (Interleaved 2 of 5). I get a much faster recognition by the ZXing app (ABZxing library) than with the b4aZXscannerLiveView sample. And speed and reliability are critical for my project.

The difference is of course, that the ZXing app only recognizes 1D barcodes that are aligned with its red "laser line", while your library recoginzes 1D barcodes in all orientations. Maybe that is the speed advantage, because searching only for barcode patterns along the laser line is much easier that looking for patterns in all directions.
Could that restriction be implemented in your library?

When reading about this topic I realized that there is the build-in Google Play Mobile Vision API and was wondering whether this might be an option for fast 1D barcode detection.

thanks a lot,
John
Try this project https://www.b4x.com/android/forum/t...other-1d-2d-barcodes.49084/page-4#post-378973 and use the library files in the post directly above it (I.e post #74)
 
Upvote 0

Johan Schoeman

Expert
Licensed User
Longtime User
Hi,

Android contains since last summer the Google Play Mobile Vision API, which allows native barcode detection.

Documentation: https://developers.google.com/vision/barcodes-overview
Example: https://github.com/googlesamples/android-vision

Has anyone used this API?
Could anyone please make an library to use it from B4A?
I think that could be very helpful for many users!

I know there are already barcode scanner options in B4A.
So far I use the ABZxing library, which is very fast for 1D barcodes, but can only be used in landscape mode and requires the Zxing app.
I also tested Johan Schoeman's barcode scanner library, which can be used in portrait mode and as standalone. However, it was verrrrrry slow for 1D codes in portrait mode and therefore no option for scanning many barcodes.

Moreover, I always prefer to use a native API rather than a third-party solution because it gives me a better feeling about continued support...

Thanks a lot,
John
You can fiddle around with this...https://www.b4x.com/android/forum/t...scan-qr-codes-and-other-1d-2d-barcodes.66408/

See the last posting that I have done in that thread.
 
Upvote 0
Top