Android Chrome Debug

WebView Debug

There are several cases to use WebView as Android Application.
In that case, We cannot do anything in WebView Contents.
Luckily, we can see contents in WebView using Chrome Debug.

Defails : Chrome

Requirement

Above Android 4.4(kitkat)
App Build over 4.4
Device over 4.4 OS

Steps

Following are steps to do this.

Code in your MainActivity

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
   if (0 != (getApplicationInfo().flags &= ApplicationInfo.FLAG_DEBUGGABLE)){
      WebView.setWebContentsDebuggingEnabled(true);
   }
}

This will work over Android 4.4.(compile over 4.4)

See chrome view

Open chrome://inspect/#devices and see

You can see contents using