enable WebView Debugging - Android android.webkit

Android examples for android.webkit:WebView

Description

enable WebView Debugging

Demo Code

import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Build;
import android.webkit.CookieManager;
import android.webkit.CookieSyncManager;
import android.webkit.WebView;

public class Main{

    /**//ww w. ja v  a2s. c  om
     * 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