블로그 이미지
Pina Colada

카테고리

분류 전체보기 (14)
IT web (11)
테스트 (0)
Android (3)
Total
Today
Yesterday

달력

« » 2025.5
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

공지사항

태그목록

최근에 올라온 글

Android Kitkat(4.4) 미만 모델에서는
크롬 insepector와 연결해서 디버깅을 할 수 없기 때문에
로그로 디버깅을 해야하지만
 
일반적으로
WebView에서 console.log를 이용해도
Android SDK의 logcat에서는 출력이 되지 않습니다.
 
출력이 가능하기 위해서는

Native에서 추가적인 처리가 필요합니다.

WebView myWebView = (WebView) findViewById(R.id.webview);
myWebView.setWebChromeClient(new WebChromeClient() {
  public boolean onConsoleMessage(ConsoleMessage cm) {
    Log.d("MyApplication", cm.message() + " -- From line "
                         + cm.lineNumber() + " of "
                         + cm.sourceId() );
    return true;
  }
});


출처 : 


Posted by Pina Colada
, |

최근에 달린 댓글

최근에 받은 트랙백

글 보관함