Michael Thomas wrote: > Hi all, > > I just got my 1.5 pushed to me yesterday and it seems that > WebView.addJavascriptInterface stopped > working.
Visit: http://commonsware.com/AdvAndroid where you will find source code to one of my books. In that ZIP file, you will find a couple of WebKit projects, both of which use addJavascriptInterface(), and both of which work fine on Android 1.5. > 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"); > } Why are you calling addJavascriptInterface() in onLoadResource()? Why not before you load the page? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books.html --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---