Is there a way to pass result of localstorage:getItem() to activity from webview
问题 Am using webview to load a page in android. Once the page is loaded, localstorage is updated. I want to retrieve data from it. Above kitkat, using evaluateJavascript am able to obtain the data. It have a callback. The problem is with versions below kitkat, where i have to use loadUrl() for it. loadUrl("javascript:localStorage.getItem('"+ key +"')"); I want to pass the value returned by function getItem(), to calling activity. 回答1: you can do it. First you need to add javascript interface to