Android WebView File Upload Fix (Agate Java Script Plugin)
Fixes the issue that <input type="file"> does not work on Android 4.4.2 by using Agate Java Script Plugin.
It does not need any modication of sever web page.
- This is a sample plugin for very simple cases. It does not cover every case.
- Maybe some modifications will be needed to use this plugin to your site.
- First it checks Android OS version. It works for only 4.4, 4.4.1, 4.4.2. The others does not need this plugin.
- It hides every <input type="file"> tag and insert custom upload button.
- It hooks HTML "FORM.submit()" function and uses native post method of MOML http object.
See assets/moml/ui/androidFileUploadFix-1.1.0.js for detail.
- Open "assets/moml/ui/webView.xml" file.
- Find AGATEWEBVIEW.src attribute and replace "index.htm" value to your URL.
Yes, but additional works are required.
- Implement basic file upload feature. (http://stackoverflow.com/a/24280517/3082485)
- Add bridged Java Script Object functions for replacing agate.appLauncher to accept file from user.
- Add bridged Java Script Object functions for replacing agate.http.post.
- Latest version of Agate Library : http://applusform.com