Skip to content

Latest commit

 

History

History
85 lines (52 loc) · 2.66 KB

README.md

File metadata and controls

85 lines (52 loc) · 2.66 KB

Download License

WebView Logger

A WebView Logger get the logs from console without using chrome://inspect.

Usage

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

  1. View Logs from webview
  2. Send logs to mail

Implementation

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.

Configurations

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")

Screen shots

When install your webview application wvl launcher icon also added into launcher screen like below spcified.

Launcher Screen

Open WVL first then open webview logger to get listen to latest logs.

WVL view

WVL

Application(Load sample web site in webview)

Demo Application

Click on send icon to send logs to mail that you configured.


Contact

If you have any questions or comments about this component, or need help using it, please either raise an issue or email Support.


Licence

This software is lincense under License