Any ideas of how to convert this ValueCallback into suspend? evaluateJavascript needs to be called from the main thread failing to do so throws an exception ( All WebView methods must be called on the same thread. (Expected Looper Looper (main, tid 2) {3acde0b} called on null, FYI main Looper is Looper (main, tid 2) {3acde0b}))
Copy code
return suspendCoroutine { cont ->
webView.evaluateJavascript( string ) { result ->
cont.resume( result )
}
}