KenCorbettJr commented on code in PR #1609:
URL: https://github.com/apache/cordova-android/pull/1609#discussion_r1181887573
##########
framework/src/org/apache/cordova/engine/SystemWebChromeClient.java:
##########
@@ -212,53 +217,110 @@ public View getVideoLoadingProgressView() {
}
@Override
- public boolean onShowFileChooser(WebView webView, final
ValueCallback<Uri[]> filePathsCallback, final WebChromeClient.FileChooserParams
fileChooserParams) {
+ public boolean onShowFileChooser(WebView webView, final
ValueCallback<Uri[]> filePathsCallback,
+ final WebChromeClient.FileChooserParams fileChooserParams) {
+ Intent fileIntent = fileChooserParams.createIntent();
+
// Check if multiple-select is specified
Boolean selectMultiple = false;
if (fileChooserParams.getMode() ==
WebChromeClient.FileChooserParams.MODE_OPEN_MULTIPLE) {
selectMultiple = true;
}
- Intent intent = fileChooserParams.createIntent();
- intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, selectMultiple);
-
+ fileIntent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, selectMultiple);
+
// Uses Intent.EXTRA_MIME_TYPES to pass multiple mime types.
String[] acceptTypes = fileChooserParams.getAcceptTypes();
if (acceptTypes.length > 1) {
- intent.setType("*/*"); // Accept all, filter mime types by
Intent.EXTRA_MIME_TYPES.
- intent.putExtra(Intent.EXTRA_MIME_TYPES, acceptTypes);
+ fileIntent.setType("*/*"); // Accept all, filter mime types by
Intent.EXTRA_MIME_TYPES.
+ fileIntent.putExtra(Intent.EXTRA_MIME_TYPES, acceptTypes);
+ }
+
+ // Image from camera intent
+ Uri tempUri = null;
+ Intent captureIntent = null;
+ if (fileChooserParams.isCaptureEnabled()) {
+ captureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
Review Comment:
I added this to the AndroidManifest as you suggested.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]