Android Question Google Vision barcode scanner based on Camera2 lib

peacemaker

Expert
Licensed User
HI, All

Do we have any working example of Camera2 for Google Vision barcode scanner ?
I have prepared the example, please, try.

0) My Android 8 Samsung shoes that "SupportedHardwareLevel = LIMITED" :(, seems, i cannot test well
1) Getting preview pictures - freezes the interface. CamEx v.1.x is working OK with 0.1 sec interval of QR-code recognition with FullHD preview image size.

Suggest and improve the code for all, please.
 

Attachments

Last edited:

peacemaker

Expert
Licensed User
It's not the Camera2 lib used.
I have my code based on this code, working OK, but seems, some manual camera settings are needed. And i need to understand the advantages of Camera2 lib for Vision.
Seems, some trouble with Preview in Camera2, stranges freezes.

I have added the test project to the 1st post, please, try and help to make it working.

upd: i have measured that barcode scanning Camera1 example needs ~0.25 sec for each FullHD preview image, and no freezes of the interface.
But this Camera2 example (that does not recognize codes yet) saves the FullHD preview image during ~0.45 second and interface is periodically frozen.
If you tried my project sample, please, drop any result words here.
 
Last edited:
Top