KenCorbettJr commented on code in PR #1609: URL: https://github.com/apache/cordova-android/pull/1609#discussion_r1182802985
########## framework/src/org/apache/cordova/engine/SystemWebChromeClient.java: ########## @@ -211,54 +216,137 @@ public View getVideoLoadingProgressView() { return mVideoProgressView; } + // <input type=file> support: + // openFileChooser() is for pre KitKat and in KitKat mr1 (it's known broken in + // KitKat). + // For Lollipop, we use onShowFileChooser(). + public void openFileChooser(ValueCallback<Uri> uploadMsg) { + this.openFileChooser(uploadMsg, "*/*"); + } + + public void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType) { + this.openFileChooser(uploadMsg, acceptType, null); + } + + public void openFileChooser(final ValueCallback<Uri> uploadMsg, String acceptType, String capture) { + Intent intent = new Intent(Intent.ACTION_GET_CONTENT); + intent.addCategory(Intent.CATEGORY_OPENABLE); + intent.setType("*/*"); + parentEngine.cordova.startActivityForResult(new CordovaPlugin() { Review Comment: Where did we land with this one? Should we just accept this slightly weird pattern because it works? Or should we look for a different solution? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org