How to call camera and file selector with qml webview on android ?
Unsolved
Mobile and Embedded
-
I have written permissions in AndroidManifest.xml.
<uses-permission android:name="android.permission.CAMERA"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> <uses-feature android:name="android.hardware.camera"/>
request in qml
WebView{ settings.allowFileAccess: true settings.javaScriptEnabled: true settings.localContentCanAccessFileUrls: true settings.localStorageEnabled: true } CameraPermission { id:cameraPermission } Component.onCompleted: cameraPermission.request()
The same website in the browser can call the camera and file selector, but it doesn't work in the webview. I also tried to open Filedialog(QtQuick.Dialogs) directly, and it can work.
Is there a way to solve it?