Thursday, September 30, 2010

[android-developers] WebView - Documentation of JavaScript and Java Interaction

Hello Developers,

I have found that there is a significant lack of documentation of
WebView's ability to communicate with Java via WebView.addJavaScript()
method. First, the debug document
http://developer.android.com/guide/developing/debug-tasks.html#DebuggingWebPages
appears to no longer work. Second, what object types should we expect
when going to and from JavaScript. I have done some trial and error
and it appears that complex types can cross the boundary, for example
java.util.Vector. However when a Java method returns a byte array to
JavaScript it has a type of undefined and I have been unable to coerce
it to any other type. Finally, there is great potential with this
interface and with some more attention we could go far.

-Dan

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

No comments:

Post a Comment