Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
754 views
in Technique[技术] by (71.8m points)

cordova - File Upload Not working in Android 4.4.2

I have created an app using phonegap. The app works fine on all android versions. But the file upload feature on this app does not work on Android 4.4.2. I have googled a lot on this issue, and all I have found is that Google has disabled this feature for Android 4.4.2.

Is there no work around at all? I am really in need of a solution to this problem. It would be great help if someone can suggest a solution to this issue.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

There's no chance to get file uploads working in a WebView on Android 4.4.2.

Nevertheless, the onclick or onchange events are still fired on the <input type="html"> element.

This means you can either get the file there via JavaScript or call a Java method from those event handlers and do the file upload manually.

For Cordova, there's an issue here:

https://issues.apache.org/jira/browse/CB-5294

... and a workaround here:

https://github.com/cdibened/filechooser


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...