Enable WebView debugging. - Android User Interface

Android examples for User Interface:WebView

Description

Enable WebView debugging.

Demo Code


//package com.java2s;

import android.os.Build;

import android.webkit.WebView;

public class Main {
    /**/*from  w w  w  .j  a  v a2 s.  co  m*/
     * Enable web view debugging.
     *
     * @param enabled
     *     the enabled
     */
    public static void enableWebViewDebugging(boolean enabled) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            WebView.setWebContentsDebuggingEnabled(enabled);
        }
    }
}

Related Tutorials