I am facing some issues while interacting with Javascript code from Java.

the workflow we have is:

1. Add a JavascriptInterface object in my JS.

2. Add a few more Javascripts using webview.loadUrl("javascript:XXX");

3. Firing an event to inform that our Javascript has been loaded and is 
ready to be consumed.


The problem is that if just after step 1, i call a method from the Java 
object I just inserted in the JS(window.javaObj.Method()) , I get an 
undefined error in my webconsole.

How do I know for sure that the Java object is ready to be invoked just 
after the AddJavascriptInterface() ? or at any point later .  I don't want 
to do

if(javaobject != undefined)....   
at each place I invoke the methods.

The documentatiion doesn't say much about when the object would be 
available.

-Akshat

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to