Use getUserMedia() to open camera within Android Browser

0 votes
asked Jan 12 by Thomas Brunella

I try to open my Android device camera through a webpage displayed within the Webview QML Object.

I have tested several sample pages to open the camera on my computer for instance and each time I had a permission pop-up appearing to allow the browser to use the camera. After several researches, this pop-up is provided by the Permission API (https://developers.google.com/web/updates/2015/04/permissions-api-for-the-web).

However, according to this website (https://whatwebcando.today/permissions.html), the browser provided by the QML Object doesn't support the Permission API. So, all pages asking for permission don't ask for them and I have an error message returned by getUserMedia() : PermissionDeniedError.

My Android Manifest contains theses permissions :

<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.CAPTURE_VIDEO_OUTPUT" />
<uses-feature android:name="android.hardware.camera2"/>
<uses-feature android:name="android.hardware.camera.any"/>
<uses-permission android:name="android.permission.INTERNET"/>

So, does a solution exist to avoid this problem ? Maybe in the C++ Code of my Android Application or in the Android Manifest ?

Thanks for your replies !

Tom.

Please log in or register to answer this question.

...