79084411

Date: 2024-10-14 00:07:41
Score: 1.5
Natty:
Report link

I finally found the solution

class WebAppInterfaced(val webview: WebView) {
    @JavascriptInterface
    fun PageRedirect(newUri: String) {
        webview.post(Runnable {
            webview.loadUrl("file:///android_asset/$newUri")
        });
    }

}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: exejee