See Android WebView Logs Without Using Chrome Developer Tools
This library WebView Logger(WVL) gets the logs from the console without using remote logging chrome://inspect.
Notable usage
- View Logs from WebView(ConsoleLogs)
- 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">sample@mail.com</string>
<string name="wvl_log_cache_size">20</string>
Adding web chrome client for WebView follow below implementation
That’s it now we can see logs
Open WVL first then open the WebView logger to get to listen to the latest logs.
When installing your web view application WVL launcher icon also added into launcher screen like the below specified.
Click on send icon to send logs to the mail that you configured.
Ref
How to debug with Remote debugging
https://developer.android.com/guide/webapps/debugging
WVL opensource
If you have any questions or comments about this component or need help using it, please either raise an issue or email Support.
Originally published at https://github.com.