Java Code Examples for com.tencent.smtt.sdk.WebView#setWebContentsDebuggingEnabled()

The following examples show how to use com.tencent.smtt.sdk.WebView#setWebContentsDebuggingEnabled() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RNX5WebViewManager.java    From react-native-x5 with MIT License 6 votes vote down vote up
@Override
protected WebView createViewInstance(ThemedReactContext reactContext) {
    X5WeView webView = new X5WeView(reactContext);

    webView.setWebChromeClient(new WebChromeClient() {
        @Override
        public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissionsCallback callback) {
            callback.invoke(origin, true, false);
        }
    });
    reactContext.addLifecycleEventListener(webView);
    mWebViewConfig.configWebView(webView);
    webView.getSettings().setBuiltInZoomControls(true);
    webView.getSettings().setDisplayZoomControls(false);

    // Fixes broken full-screen modals/galleries due to body height being 0.
    webView.setLayoutParams(
            new LayoutParams(LayoutParams.MATCH_PARENT,
                    LayoutParams.MATCH_PARENT));

    if (ReactBuildConfig.DEBUG && Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        WebView.setWebContentsDebuggingEnabled(true);
    }

    return webView;
}
 
Example 2
Source File: BridgeWebView.java    From AndroidFrame with Apache License 2.0 5 votes vote down vote up
private void init() {
	this.setVerticalScrollBarEnabled(false);
	this.setHorizontalScrollBarEnabled(false);
	this.getSettings().setJavaScriptEnabled(true);
       if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
           WebView.setWebContentsDebuggingEnabled(true);
       }
	this.setWebViewClient(generateBridgeWebViewClient());
}
 
Example 3
Source File: BridgeWebView.java    From AndroidFrame with Apache License 2.0 5 votes vote down vote up
private void init() {
	this.setVerticalScrollBarEnabled(false);
	this.setHorizontalScrollBarEnabled(false);
	this.getSettings().setJavaScriptEnabled(true);
       if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
           WebView.setWebContentsDebuggingEnabled(true);
       }
	this.setWebViewClient(generateBridgeWebViewClient());
}
 
Example 4
Source File: X5WebViewEngine.java    From x5webview-cordova-plugin with Apache License 2.0 5 votes vote down vote up
@TargetApi(Build.VERSION_CODES.KITKAT)
private void enableRemoteDebugging() {
    try {
        WebView.setWebContentsDebuggingEnabled(true);
    } catch (IllegalArgumentException e) {
        Log.d(TAG, "You have one job! To turn on Remote Web Debugging! YOU HAVE FAILED! ");
        e.printStackTrace();
    }
}
 
Example 5
Source File: X5WebViewEngine.java    From cordova-plugin-x5-webview with Apache License 2.0 5 votes vote down vote up
@TargetApi(Build.VERSION_CODES.KITKAT)
private void enableRemoteDebugging() {
    try {
        WebView.setWebContentsDebuggingEnabled(true);
    } catch (IllegalArgumentException e) {
        LOG.d(TAG, "You have one job! To turn on Remote Web Debugging! YOU HAVE FAILED! ");
        e.printStackTrace();
    }
}
 
Example 6
Source File: X5WebViewEngine.java    From cordova-plugin-x5-tbs with Apache License 2.0 5 votes vote down vote up
@TargetApi(Build.VERSION_CODES.KITKAT)
private void enableRemoteDebugging() {
  try {
    WebView.setWebContentsDebuggingEnabled(true);
  } catch (IllegalArgumentException e) {
    Log.d(TAG, "You have one job! To turn on Remote Web Debugging! YOU HAVE FAILED! ");
    e.printStackTrace();
  }
}
 
Example 7
Source File: BridgeWebView.java    From YCWebView with Apache License 2.0 5 votes vote down vote up
private void init() {
	this.setVerticalScrollBarEnabled(false);
	this.setHorizontalScrollBarEnabled(false);
	this.getSettings().setJavaScriptEnabled(true);
       if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
           WebView.setWebContentsDebuggingEnabled(true);
       }
}
 
Example 8
Source File: X5WebViewEngine.java    From cordova-plugin-x5engine-webview with Apache License 2.0 5 votes vote down vote up
@TargetApi(Build.VERSION_CODES.KITKAT)
private void enableRemoteDebugging() {
    try {
        WebView.setWebContentsDebuggingEnabled(true);
    } catch (IllegalArgumentException e) {
        Log.d(TAG, "You have one job! To turn on Remote Web Debugging! YOU HAVE FAILED! ");
        e.printStackTrace();
    }
}
 
Example 9
Source File: TbsBridgeWebView.java    From JsBridge with MIT License 5 votes vote down vote up
private void init() {
    this.setVerticalScrollBarEnabled(false);
    this.setHorizontalScrollBarEnabled(false);
    this.getSettings().setJavaScriptEnabled(true);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        WebView.setWebContentsDebuggingEnabled(true);
    }
    this.setWebViewClient(generateBridgeWebViewClient());
}