Hi,
I'm planning to use the JavaScript interface to Java, to connect to
Java methods that go to the network (or some other long-running
function) and deliver the results via callback.

The flow is:
1. User clicks on a link in the WebView, which calls my Java code.
2. My Java code posts a worker Runnable to a Handler, and returns
immediately.
3. The worker goes to the network, then makes a callback to the
WebView.loadUrl("function('result')") to deliver the result.


I made an example that sleeps inside the Runnable. The entire WebView
becomes unresponsive! What is the proper way (if any) of implementing
a long-running JavaScript call?

Is it safe to call loadUrl() from multiple threads?

Thanks.
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to