'Android/Java: How to open gallery photo in webview android from html ? "<input type="file" id="file" name="picture" multiple="">"? doesn't work

I created a button in html with the command

<input type="file" id="file" name="picture" multiple="">

that allows me to choose a photo in the gallery or to take a picture with the phone, but when I launch it from the webview, it doesn't work.

I did the same thing in my iOS version, and it works like a charm. It is a problem of permission ?

Here is my permission:

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.WRITE_SETTINGS" tools:ignore="ProtectedPermissions" />
    <uses-permission android:name="android.permission.MANAGE_DOCUMENTS" tools:ignore="ProtectedPermissions" />
    <uses-feature android:name="android.hardware.camera" android:required="false" />

For info, if I launch it directly in the browser in the Chrome App, it works like a charm, I obtain the pop up I want : Pop up on web

I just need to find the way to make it work the same way in my app

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source