Created
January 23, 2021 12:05
-
-
Save arulwastaken/8f3546ab8d30cd42b62f86a705edc451 to your computer and use it in GitHub Desktop.
WVL implementation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MainActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
WebView.setWebContentsDebuggingEnabled(true) | |
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") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment