Once I was faced with the task of creating an application that will display product information when scanning using augmented reality. Moreover, it was necessary to display buttons, by clicking on which it was possible to add a product and delete it. After some searches, it was decided to use Google Play Services Vision.
First, we need a view which renders a series of custom graphics to be overlayed on top of an associated preview
(i.e., the camera preview).
Add them to the layout:
All the logic for adding information about products and changing their state has been added to the ViewModel:
I implemented handling of button clicks in a fragment as follows:
Source code: https://github.com/GeorgCantor/team.marker
Thanks for attention!