我一直试图在Meteor应用上集成QR码扫描仪。当我通过浏览器运行相机时,它可以正常工作,但打包成APK时却无法工作。我尝试了多个软件包,例如https://github.com/hitchcott/meteor-qr-code-scanner,还尝试了“ https://github.com/xr0master/qrScanner”的源代码。
使用
"meteor run android-device --mobile-server https:serverdoman.com":`
\E chromium: [ERROR:web_contents_delegate.cc(197)] WebContentsDelegate::CheckMediaAccessPermission: Not supported.
我尝试添加插件:
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="me.dispatch.crosswalk-permissions"
version="0.1">
<name>Cordova Crosswalk Permissions</name>
<license>Apache 2.0 License</license>
<author>Dispatch</author>
<description>
Request the necessary crosswalk permissions on Android for a Cordova project.
</description>
<info>
This plugin replaces the need for adding permisions to the AndroidManifest.xml
file when using Crosswalk with Cordova.
</info>
<platform name="android">
<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="27" />
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.RECORD_VIDEO" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAPTURE_VIDEO_OUTPUT" />
<uses-feature android:name="android.hardware.Camera"/>
</config-file>
</platform>
</plugin>
非常感谢您的帮助,非常感谢! 我在Ubuntu 16.04上使用Meteor 1.61版。