【发布时间】:2018-05-16 20:48:26
【问题描述】:
我有一个条码扫描器应用,它使用(使用 Google Mobile Vision API 进行条码检测) 在相机活动中,我想设置一个框架,以便应用程序只读取该框架中的条形码或二维码(就像所有扫描仪应用程序一样) 如何自定义?
这是相机 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>
【问题讨论】:
-
谷歌移动视觉 API?你试过了吗?
-
是的谷歌 API
标签: android android-camera qr-code barcode-scanner