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.