Android Studio - 如何在 webview Lollipop (Android 5.0) 中上传文件 [英] Android Studio - How to upload files in webview Lollipop (Android 5.0)

查看:36
本文介绍了Android Studio - 如何在 webview Lollipop (Android 5.0) 中上传文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的应用程序使用 webview,它在 Android Jelly Bean 中运行良好.上传选项在 Android KitKat 和 Lollipop 中不起作用.

I am using webview for my app, which is working good in Android Jelly Bean. The upload option is not working in Android KitKat and Lollipop.

我阅读了一些在线论坛并发现 KitKat 版本中的文件上传已损坏.所以,我认为它不适用于 KitKat.

I read some online forums and figured out that file upload is broken in KitKat version. So, I think that it would not work on KitKat.

但是,我还是想知道如何在WebView中调用Android Lollipop中的文件上传选项.

But, I still want to know that how to call the file upload option in Android Lollipop in WebView.

谢谢

推荐答案

Lollipop 文件上传的新 api 在这里有详细说明 https://gauntface.com/blog/2014/10/17/what-you-need-to-know-about-the-webview-in-l

The new api for Lollipop file upload is detailed here https://gauntface.com/blog/2014/10/17/what-you-need-to-know-about-the-webview-in-l

这里有一个完整的代码示例https://github.com/GoogleChrome/chromium-webview-samples/tree/master/input-file-example

There is a full code sample here https://github.com/GoogleChrome/chromium-webview-samples/tree/master/input-file-example

这篇关于Android Studio - 如何在 webview Lollipop (Android 5.0) 中上传文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆