本文整理了Java中android.webkit.WebView.setWebContentsDebuggingEnabled()
方法的一些代码示例,展示了WebView.setWebContentsDebuggingEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebView.setWebContentsDebuggingEnabled()
方法的具体详情如下:
包路径:android.webkit.WebView
类名称:WebView
方法名:setWebContentsDebuggingEnabled
暂无
代码示例来源:origin: Justson/AgentWeb
public static void debug() {
DEBUG = true;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
WebView.setWebContentsDebuggingEnabled(true);
}
}
代码示例来源:origin: lzyzsd/JsBridge
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());
}
代码示例来源:origin: ankidroid/Anki-Android
private void setInterface() {
if (mCurrentCard == null) {
return;
}
if (mCard == null) {
mCard = createWebView();
// On your desktop use chrome://inspect to connect to emulator WebViews
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT &&
AnkiDroidApp.getSharedPrefs(this).getBoolean("html_javascript_debugging", false)) {
WebView.setWebContentsDebuggingEnabled(true);
}
mCardFrame.addView(mCard);
}
if (mCard.getVisibility() != View.VISIBLE) {
mCard.setVisibility(View.VISIBLE);
}
}
代码示例来源:origin: JZ-Darkal/AndroidHttpCapture
WebView.setWebContentsDebuggingEnabled(true);
代码示例来源:origin: wendux/DSBridge-Android
/**
* Set debug mode. if in debug mode, some errors will be prompted by a dialog
* and the exception caused by the native handlers will not be captured.
*
* @param enabled
*/
public static void setWebContentsDebuggingEnabled(boolean enabled) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
WebView.setWebContentsDebuggingEnabled(enabled);
}
isDebug = enabled;
}
代码示例来源:origin: ac-pm/Inspeckage
WebView.setWebContentsDebuggingEnabled(true);
代码示例来源:origin: mopub/mopub-android-sdk
@TargetApi(Build.VERSION_CODES.KITKAT)
private static void setWebDebugging() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
WebView.setWebContentsDebuggingEnabled(true);
}
}
代码示例来源:origin: google/blockly-android
@Override
protected View onCreateContentView(int parentId) {
View root = getLayoutInflater().inflate(R.layout.turtle_content, null);
mTurtleWebview = (WebView) root.findViewById(R.id.turtle_runtime);
mTurtleWebview.getSettings().setJavaScriptEnabled(true);
mTurtleWebview.setWebChromeClient(new WebChromeClient());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
WebView.setWebContentsDebuggingEnabled(true);
}
mTurtleWebview.loadUrl("file:///android_asset/turtle/turtle.html");
return root;
}
代码示例来源:origin: wordpress-mobile/WordPress-Editor-Android
@SuppressLint("NewApi")
private void enableWebDebugging(boolean enable) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
AppLog.i(T.EDITOR, "Enabling web debugging");
WebView.setWebContentsDebuggingEnabled(enable);
}
mWebView.setDebugModeEnabled(mDebugModeEnabled);
}
代码示例来源:origin: adblockplus/libadblockplus-android
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
bindControls();
initControls();
// allow WebView debugging in "Debug" build variant
// https://developers.google.com/web/tools/chrome-devtools/remote-debugging/webviews
if (BuildConfig.DEBUG)
{
WebView.setWebContentsDebuggingEnabled(true);
}
}
代码示例来源:origin: Flipboard/GoldenGate
webview.setWebChromeClient(new WebChromeClient());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
WebView.setWebContentsDebuggingEnabled(true);
代码示例来源:origin: wiglenet/wigle-wifi-wardriving
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_registration);
WebView regWebView = (WebView) findViewById(R.id.wigle_registration_container);
WebSettings webSettings = regWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
regWebView.clearCache(true);
MainActivity mActivity = MainActivity.getMainActivity();
if (mActivity != null) {
clearCookies(mActivity.getApplicationContext());
}
regWebView.setWebChromeClient(new WebChromeClient());
regWebView.getSettings().setUserAgentString(AGENT);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
WebView.setWebContentsDebuggingEnabled(true);
}
regWebView.addJavascriptInterface(new WiGLERegistrationInterface(this),
"WiGLEWiFi");
regWebView.loadUrl(MainActivity.REG_URL);
}
代码示例来源:origin: tomahawk-player/tomahawk-android
WebView.setWebContentsDebuggingEnabled(true);
代码示例来源:origin: stackoverflow.com
mainWebView.setWebContentsDebuggingEnabled(true);
代码示例来源:origin: canqihe/TmallSale
settings = webView.getSettings();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
WebView.setWebContentsDebuggingEnabled(true);
代码示例来源:origin: JeasonWong/NewsTemplate
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ButterKnife.bind(this);
mScrollViewNews.setScrollViewCallbacks(mScrollViewScrollCallbacks);
mWebNews.setScrollViewCallbacks(mWebViewScrollCallbacks);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
WebView.setWebContentsDebuggingEnabled(true);
}
mWebNews.getSettings().setJavaScriptEnabled(true);
mWebNews.addJavascriptInterface(this, "bazhang");
mWebNews.setWebViewClient(new WebViewClient() {
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
addImgClickListener();
}
});
mWebNews.loadUrl("file:///android_asset/newscont.html");
mPresenter = new NewsPresenter(this);
}
代码示例来源:origin: halzhang/EverExample
WebView webView = (WebView) findViewById(R.id.web_view);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
WebView.setWebContentsDebuggingEnabled(true);
代码示例来源:origin: ZhuoKeTeam/QPM
WebView.setWebContentsDebuggingEnabled(true);
代码示例来源:origin: zhao-mingjian/qvod
WebView.setWebContentsDebuggingEnabled(true);
代码示例来源:origin: xudjx/webprogress
webView.setWebContentsDebuggingEnabled(BuildConfig.DEBUG);
内容来源于网络,如有侵权,请联系作者删除!