开发者

addJavascriptInterface : object method not found

I wrote new example similar to WebView Demo and registered my Java object with addJavascriptInterface() to webview. and in Java script I am able to call java methods.

Later, I modified android browser code and tried to add Object to javascript,in a same way. but object members are not accessible in javascript and I 开发者_开发问答get runtime error like

"Uncaught TypeError: Object com.android.browser.BrowserActivity$MyJavaScriptInterface@43bf7eb8 has no method 'launchPlayer' "

Where as launchPlayer method is available in MyJavaScriptInterface class.

Can anybody tell me what is the difference in Browser app, which stops exporting methods to Javascript.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜