Android(安卓)WebView选择本地文件上传
This sample demonstrate android webview choose file to upload.
I just implement the client code ,the server code of receiver the file is not implemented.
First of all, you should build the server code by your eclipse(server code wrote by java).
Then update the ip of url(get ip mac command ifconfig
windows command ipconfig
).
http://192.168.1.109
:8080/AndroidMvvmServer/upload
Eventually, Run the android code on your device or emulator.
1. Function :
android webview choose file to upload
2. Android Version
This sample has test in Android3.0、Android4.0、Android 5.0、Android6.0
3. Bug
In the android4.4 version , the web page canot get the right file name if you choose file from Photo
not file manager
. However it works in lolipop.
Look below gif(android4.4):
Referenced document
- chromium-webview-samples
- file-upload-in-webview
talk is cheap show you the code
更多相关文章
- 代码中设置drawableleft
- android 3.0 隐藏 系统标题栏
- Android开发中activity切换动画的实现
- Android(安卓)学习 笔记_05. 文件下载
- Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
- 技术博客汇总
- android 2.3 wifi (一)
- AndRoid Notification的清空和修改
- Android中的Chronometer