4

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.

Purush
  • 41
  • 1
  • 2

0 Answers0