com.tencent.smtt.export.external.interfaces.ConsoleMessage Java Examples

The following examples show how to use com.tencent.smtt.export.external.interfaces.ConsoleMessage. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: X5WebChromeClient.java    From AndroidHybridLib with Apache License 2.0 5 votes vote down vote up
@Override
public boolean onConsoleMessage(ConsoleMessage cm) {
    if (null != cm) {
        Log.i(TAG, cm.message() + " -- From line "
                + cm.lineNumber() + " of "
                + cm.sourceId());
    }
    return super.onConsoleMessage(cm);
}
 
Example #2
Source File: WebChromeClientWrapper.java    From AgentWebX5 with Apache License 2.0 5 votes vote down vote up
public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
    /*onConsoleMessage(consoleMessage.message(), consoleMessage.lineNumber(),
            consoleMessage.sourceId());*/

    if (this.mRealWebChromeClient != null)
        return this.mRealWebChromeClient.onConsoleMessage(consoleMessage);
    return super.onConsoleMessage(consoleMessage);
}
 
Example #3
Source File: X5WebChromeClient.java    From x5webview-cordova-plugin with Apache License 2.0 5 votes vote down vote up
@TargetApi(8)
@Override
public boolean onConsoleMessage(ConsoleMessage consoleMessage)
{
    if (consoleMessage.message() != null)
        LOG.d(LOG_TAG, "%s: Line %d : %s" , consoleMessage.sourceId() , consoleMessage.lineNumber(), consoleMessage.message());
     return super.onConsoleMessage(consoleMessage);
}
 
Example #4
Source File: X5WebChromeClient.java    From cordova-plugin-x5-webview with Apache License 2.0 5 votes vote down vote up
@TargetApi(8)
public boolean onConsoleMessage(ConsoleMessage consoleMessage)
{
    if (consoleMessage.message() != null)
        LOG.d(LOG_TAG, "%s: Line %d : %s" , consoleMessage.sourceId() , consoleMessage.lineNumber(), consoleMessage.message());
     return super.onConsoleMessage(consoleMessage);
}
 
Example #5
Source File: X5WebChromeClient.java    From cordova-plugin-x5-tbs with Apache License 2.0 5 votes vote down vote up
@TargetApi(8)
@Override
public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
  if (consoleMessage.message() != null)
    LOG.d(LOG_TAG, "%s: Line %d : %s", consoleMessage.sourceId(), consoleMessage.lineNumber(), consoleMessage.message());
  return super.onConsoleMessage(consoleMessage);
}
 
Example #6
Source File: X5WebChromeClient.java    From YCWebView with Apache License 2.0 5 votes vote down vote up
/**
 * 接收JavaScript控制台消息
 * @param consoleMessage                    message
 * @return
 */
@Override
public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
    String message = consoleMessage.message();
    ConsoleMessage.MessageLevel messageLevel = consoleMessage.messageLevel();
    String sourceId = consoleMessage.sourceId();
    //X5LogUtils.i("-------onConsoleMessage-------"+message+"----"+sourceId);
    return super.onConsoleMessage(consoleMessage);
}
 
Example #7
Source File: X5WebChromeClient.java    From cordova-plugin-x5engine-webview with Apache License 2.0 5 votes vote down vote up
@TargetApi(8)
@Override
public boolean onConsoleMessage(ConsoleMessage consoleMessage)
{
    if (consoleMessage.message() != null)
        LOG.d(LOG_TAG, "%s: Line %d : %s" , consoleMessage.sourceId() , consoleMessage.lineNumber(), consoleMessage.message());
     return super.onConsoleMessage(consoleMessage);
}
 
Example #8
Source File: CBrowserMainFrame7.java    From appcan-android with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
    if (WDataManager.sRootWgt!=null&&WDataManager.sRootWgt.m_appdebug==1 && !TextUtils.isEmpty(WDataManager.sRootWgt.m_logServerIp)) {
        if (consoleMessage.messageLevel() != ConsoleMessage.MessageLevel.WARNING) {//过滤掉warning
            BDebug.sendUDPLog(formatConsole(consoleMessage));
        }
    }
    return super.onConsoleMessage(consoleMessage);
}
 
Example #9
Source File: CBrowserMainFrame7.java    From appcan-android with GNU Lesser General Public License v3.0 5 votes vote down vote up
private static String formatConsole(ConsoleMessage consoleMessage){
    StringBuilder stringBuilder=new StringBuilder();
    stringBuilder.append("[ ")
            .append(simpleSourceInfo(consoleMessage.sourceId()))
            .append(" line : ")
            .append(consoleMessage.lineNumber())
            .append(" ")
            .append(consoleMessage.messageLevel().toString().toLowerCase())
            .append(" ]\n")
            .append(consoleMessage.message())
            .append("\n");
    return stringBuilder.toString();
}
 
Example #10
Source File: DefaultChromeClient.java    From AgentWebX5 with Apache License 2.0 4 votes vote down vote up
@Override
public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
    super.onConsoleMessage(consoleMessage);
    LogUtils.i(TAG, "consoleMessage:" + consoleMessage.message() + "  lineNumber:" + consoleMessage.lineNumber());
    return true;
}
 
Example #11
Source File: WebChromeClientListener.java    From JsBridge with MIT License 4 votes vote down vote up
@Override
public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
    return false;
}
 
Example #12
Source File: X5VideoWebView.java    From AcgClub with MIT License votes vote down vote up
void onConsoleMessage(ConsoleMessage consoleMessage); 
Example #13
Source File: OnWebChromeClientListener.java    From JsBridge with MIT License votes vote down vote up
boolean onConsoleMessage(ConsoleMessage consoleMessage);