我按照這個tutorial配置我的項目使用cordova(也稱爲phonegap)2.3.0。如何在android中使用phonegap在webView中實現條碼掃描器?
如果我通過使用CordovaWebView從我的服務器加載網頁(我不確定是否可以簡單地使用WebView)。
該webView包含一個名爲「條碼掃描儀」的按鈕。我怎樣才能實現條碼掃描器插件,這將允許網頁使用我的設備上的相機掃描條碼?有教程嗎?
webView xml如下所示。
<org.apache.cordova.CordovaWebView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
style="?android:attr/textAppearanceLarge"
android:id="@+id/detailitem_detail"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
tools:context=".DetailFragment" />
退房此鏈接:http://stackoverflow.com/questions/8311380/phonegap-barcode-scanner –