A WebView Logger get the logs from console without using chrome://inspect.
For the application which is use WebView when its reach to the client inorder to find bugs and resolve fix. WVL save the log in device it can be view as separete and as well send log in mail.
Notable usage
- View Logs from webview
- Send logs to mail
Add below line in Project.gradle
repositories {
//... other repos
maven {
url "https://dl.bintray.com/arulmani/WebKit"
}
}
Add below line in App.gradle under Dependecy section
implementation 'com.arul.webkit:wvl:1.0.4'
That's it sync the project.
We can configure mail and cache size of log tobe store.
Add below line in strings.xml
.
<string name="wvl_report_email">[email protected]</string>
<string name="wvl_log_cache_size">20</string>
Adding webchrome client for webview follow below implementation
webview.settings.apply {
javaScriptEnabled = true
}
// wvl implementation
webview.webChromeClient = object : WebViewLogger(application = application) {
override fun onConsoleMessage(consoleMessage: ConsoleMessage?, section: String) {
super.onConsoleMessage(consoleMessage, section)
}
}
webview.loadUrl("https://dev.to")
When install your webview application wvl launcher icon also added into launcher screen like below spcified.
Open WVL first then open webview logger to get listen to latest logs.
Click on send icon to send logs to mail that you configured.
If you have any questions or comments about this component, or need help using it, please either raise an issue or email Support.