[android-developers] Re: 1.5 addjavascriptinterface

2009-06-04 Thread Mark Murphy
Michael Thomas wrote: 1) window.phz is not null and is an object in my js (as before in 1.0) Don't do that. 3) window.phz.backbutton is now null (ie, the debugmsg(...) is called in the js) Don't do that either. I do not believe it is part of the API contract that the Java objects are

[android-developers] Re: 1.5 addjavascriptinterface

2009-06-04 Thread Michael Thomas
Hmm... yes, that's odd. It's been a while, but iirc not putting it in onLoadResource() in 1.0 was giving me trouble. I'm pretty sure I went to the trouble after some googling. When I put before the loadURL (), it now works again. That's pretty bizarre behavior though. I can see not loading the

[android-developers] Re: 1.5 addjavascriptinterface

2009-06-04 Thread Michael Thomas
would it be better to just try { window.phz.backbutton () } catch () instead? this need to be cross-browser safe. I have noticed that the normally implicit .toString() js method causes chunks to be blown, so I'm not doubting you :) Mike On Jun 4, 4:28 pm, Mark Murphy

[android-developers] Re: 1.5 addjavascriptinterface

2009-06-04 Thread Mark Murphy
Michael Thomas wrote: would it be better to just try { window.phz.backbutton () } catch () instead? this need to be cross-browser safe. Oof. That could be trouble. Can't you sniff on browser type and serve up the proper HTML based on whether it's an Android device? I have noticed

[android-developers] Re: 1.5 addjavascriptinterface

2009-06-04 Thread Michael Thomas
On Jun 4, 4:49 pm, Mark Murphy mmur...@commonsware.com wrote: Michael Thomas wrote: would it be better to just try {    window.phz.backbutton () } catch () instead? this need to be cross-browser safe. Oof. That could be trouble. Well, both methods _do_ work. What do you mean by

[android-developers] Re: 1.5 addjavascriptinterface

2009-06-04 Thread Mark Murphy
Michael Thomas wrote: Well, both methods _do_ work. What do you mean by trouble anyway? If it works, cool. And why would a try/catch block be a problem? The native method isn't what's throwing the error, it's the _lack_ of the jsi method (ie, on a non- android device). Surely the jsi