У меня есть приложение сканера штрих-кода, которое использует (обнаружение штрих-кода с API Google Mobile Vision) в работе камеры. Я хочу установить рамку, чтобы приложение просто считывало штрих-коды или QR-коды, которые находятся в этой рамке (как и все приложения сканера), как я могу настроить его?
вот макет камеры xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".ScanBarcodeActivity">
<SurfaceView
android:id="@+id/cammeraPreview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>