CB-9148 (android) Add Support for input[type=file] File Chooser
This commit is contained in:
parent
2a383a66c5
commit
26f7ef3c67
@ -29,6 +29,7 @@ import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.text.InputType;
|
||||
import android.util.Log;
|
||||
import android.util.TypedValue;
|
||||
import android.view.Gravity;
|
||||
import android.view.KeyEvent;
|
||||
@ -41,6 +42,8 @@ import android.view.inputmethod.InputMethodManager;
|
||||
import android.webkit.CookieManager;
|
||||
import android.webkit.CookieSyncManager;
|
||||
import android.webkit.HttpAuthHandler;
|
||||
import android.webkit.ValueCallback;
|
||||
import android.webkit.WebChromeClient;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
@ -68,10 +71,6 @@ import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import android.util.Log;
|
||||
import android.webkit.ValueCallback;
|
||||
import android.webkit.WebChromeClient;
|
||||
|
||||
@SuppressLint("SetJavaScriptEnabled")
|
||||
public class InAppBrowser extends CordovaPlugin {
|
||||
|
||||
@ -107,7 +106,6 @@ public class InAppBrowser extends CordovaPlugin {
|
||||
private boolean mediaPlaybackRequiresUserGesture = false;
|
||||
private boolean shouldPauseInAppBrowser = false;
|
||||
private boolean useWideViewPort = true;
|
||||
|
||||
private ValueCallback<Uri> mUploadCallback;
|
||||
private ValueCallback<Uri[]> mUploadCallbackLollipop;
|
||||
private final static int FILECHOOSER_REQUESTCODE = 1;
|
||||
@ -731,7 +729,6 @@ public class InAppBrowser extends CordovaPlugin {
|
||||
inAppWebView = new WebView(cordova.getActivity());
|
||||
inAppWebView.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
|
||||
inAppWebView.setId(Integer.valueOf(6));
|
||||
|
||||
// File Chooser Implemented ChromeClient
|
||||
inAppWebView.setWebChromeClient(new InAppChromeClient(thatWebView) {
|
||||
// For Android 5.0+
|
||||
@ -783,7 +780,6 @@ public class InAppBrowser extends CordovaPlugin {
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
WebViewClient client = new InAppBrowserClient(thatWebView, edittext);
|
||||
inAppWebView.setWebViewClient(client);
|
||||
WebSettings settings = inAppWebView.getSettings();
|
||||
@ -1048,6 +1044,7 @@ public class InAppBrowser extends CordovaPlugin {
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
super.onPageFinished(view, url);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user