Code example for ConsoleMessage

Methods: lineNumber, message, messageLevel, sourceId

0
 
    //logging from webview JS 
    WebChromeClient chromeClient = new WebChromeClient() {
        @Override 
        public boolean onConsoleMessage(ConsoleMessage consoleMessage) { 
            Log.i("########", consoleMessage.sourceId() + ": " + consoleMessage.messageLevel() + " : " + consoleMessage.message() + " : " + consoleMessage.lineNumber()); 
            return true; 
        } 
    }; 
 
 
    //////////////////////////////////////////////////////////////OnGestureListener methods 
    public boolean onDown(MotionEvent motionEvent) {
        return false; 
    } 
 
    public void onShowPress(MotionEvent motionEvent) {
 
    } 
 
    public boolean onSingleTapUp(MotionEvent motionEvent) {