A solution for Android 4.4 (KitKat) webiew issue :
-
openFileChooser not called when is clicked on android 4.4 webview https://code.google.com/p/android/issues/detail?id=62220
-
Android 4.4 WebView cannot load "content://" urls in html page https://code.google.com/p/android/issues/detail?id=63033
Note : https://developer.chrome.com/multidevice/webview/overview
If you are currently using content:// URLs to load files from a content provider in your application, note that these URLs only work when accessed from local content. That is, web content hosted outside your application is not allowed to access files built into your application.
Solution :
-
Add an element in web page, when click the element, use javascript call app function to choose images.
-
Convert choosed images to base64 string, and pass it to web page.
-
Show image : img.src="data:image/png;base64,xxxxx base64 string form app xxxxx"
-
Post the base64 string to your server and decode it, then your can save image.
This is my solution for Android 4.4(Kitkat) webview, if you have other solution, please tell me, thx.
Reference :
http://developer.android.com/guide/webapps/migrating.html