InterestingÅ It's not a showstopper for the other platforms so let's keep it in there until we have more platforms on board. Then we can better figure out how a refactor of this makes sense.
Simon can you file a cordovaJS-tagged bug in JIRA for this that we can shelf for later resolution? On 2/28/12 6:15 AM, "Simon MacDonald" <[email protected]> wrote: >Other than it is insanely easy to do it in JavaScript? No. > >Once everyone else supports common JS I'll have to move the timeout to the >Java layer. > >Simon Mac Donald >http://hi.im/simonmacdonald > > >On Tue, Feb 28, 2012 at 9:04 AM, Drew Walters <[email protected]> wrote: > >> Is there a reason the timeout couldn't be handled in the native code? >> >> On Tue, Feb 28, 2012 at 7:56 AM, Simon MacDonald >> <[email protected]> wrote: >> > Okay, I put the Android impl back into the NetworkConnection class. >>We'll >> > have to talk about how this effects the other platforms. One weird >>thing >> > you'll see is my use of setTimeout. On Android when you go between >>wifi >> and >> > 3G you will get an offline event if we don't wait a bit to see if a 3G >> > connection is established. This has been discussed ad nauseam on the >>list >> > before. >> > >> > Simon Mac Donald >> > http://hi.im/simonmacdonald >> > >> > >> > On Mon, Feb 27, 2012 at 6:08 PM, Simon MacDonald >> > <[email protected]>wrote: >> > >> >> I will commit later tonight. Family function at 7pm our time so busy >> right >> >> now. >> >> >> >> Simon Mac Donald >> >> http://hi.im/simonmacdonald >> >> >> >> >> >> >> >> On Mon, Feb 27, 2012 at 4:40 PM, Filip Maj <[email protected]> wrote: >> >> > Simon: make the change. Cordova-js is not integrated into BB yet >>so it >> >> may >> >> > be a breaking change but Tim and Gord should take a look at it and >> make >> >> > the necessary change. >> >> > >> >> > I agree with the change overall. Native returns a string that >>defines >> the >> >> > type of connection. Let's get the other native platforms lined up >>with >> >> > this and it won't be an issue. >> >> > >> >> > Tim, can you please take a note of this and add it to your >>BlackBerry >> <-> >> >> > cordova-js integration todo list? >> >> > >> >> > On 12-02-27 1:20 PM, "Simon MacDonald" <[email protected]> >> >> wrote: >> >> > >> >> >>Hey, >> >> >> >> >> >>The current version of common JS has a bug where >> >> >>navigator.network.connection.type is always undefined and the >> >> >>online/offline events never fire. I have a fix for it here: >> >> >> >> >> >> >> >> >> >>https://github.com/macdonst/callback-js/commit/32d2426aac7d468f59036ecff3 >>5 >> >> >>b15810071a34d >> >> >> >> >> >>but that will probably break BlackBerry. We need to come together >>on a >> >> >>common way to do this before we release 1.5. I will talk to Becky >>and >> >> Drew >> >> >>about it but I just wanted other to know there is a problem. >> >> >> >> >> >>Simon Mac Donald >> >> >>http://hi.im/simonmacdonald >> >> > >> >> >>
