Hi all,
I just got my 1.5 pushed to me yesterday and it seems that
WebView.addJavascriptInterface stopped
working.
What I have is:
public class phzJSI {
public void backbutton () {
mHandler.post(new Runnable () {
public void run () {
setMain (null);
}
});
}
private class phzWVC extends WebViewClient {
public void onLoadResource (WebView w, String url) {
w.addJavascriptInterface(new phzJSI (), "phz");
}
and finally in my javascript:
if (window.phz) {
if (window.phz.backbutton)
window.phz.backbutton ();
else {
debugmsg ("no jsi binding: %s\n", typeof (window.phz));
}
What I can say for sure is:
0) this worked just find in 1.0_r1/2.
1) window.phz is not null and is an object in my js (as before in 1.0)
2) w.addJavascriptInterface () is called (as before in 1.0)
3) window.phz.backbutton is now null (ie, the debugmsg(...) is called
in the js)
What's going on? Are the functions named something else or something?
Mike
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---