Android : callback function from javascript to java

前端 未结 1 657
[愿得一人]
[愿得一人] 2021-01-19 04:46

I have created an application in which i am using webview and loading a simple static html page. I am calling a java script function from activity but i am unable to call a

1条回答
  •  清酒与你
    2021-01-19 05:09

    Make it

    @JavascriptInterface
    public void returnResult() {
        Log.v(null, "result received");
    }
    

    This annotation allows exposing methods to JavaScript.

    0 讨论(0)
提交回复
热议问题