Cloudinary Widget in Android Webview
We have the cloudinary widget embedded in a web page, which is loaded into our Android app via a WebView. When hitting the "My Files" button, nothing happens.
I have seen there are other posts asking about the same issue, like (https://support.cloudinary.com/hc/en-us/community/posts/360008869132-Upload-widget-not-working-on-android-gmail-webview), but none of them seem to be answered.
We also tried applying a WebChromeClient to the webview, overriding the "onShowFileChooser" method, like described here (https://stackoverflow.com/questions/15725814/upload-an-image-from-camera-or-gallery-in-webview). This does show the gallery page and allows the user to select an image, but upon calling the listener in "onShowFileChooser", nothing happens.
I tried the same web page in the Chrome app and it works perfectly, so this issue is only for the web view within our Android app.
Any help is appreciated, thanks!
-
Any news on this ? I'm experiencing exact same problem with my website and Cloudinary Widget.
"My files" button just doesn't work inside WebView Browser from Apps like Instagram, Messenger etc.
0 -
Hi,
This issue could be related to the WebView permissions. Can you please check if you gave the right permissions in your Webview configuration to access your files?
Thanks,
Francis0 -
After few debugging hours I've found out what's the problem and also the solution.
In my options configuration for widget I was using:
clientAllowedFormats: ['jpg', 'png', 'gif']
and this config seems to be problematic for android webview
I've replaced it with:
clientAllowedFormats: ['image']
and it started to work.
Thanks.
0 -
Hi Filip,
Thanks for sharing the solution to this issue and glad to know your application is already working. Should you have some other queries, please feel free to open a support ticket here (https://support.cloudinary.com/hc/en-us/requests/new).
0
Post is closed for comments.
Comments
4 comments