cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leutwyler, Markus" <markus.leutwy...@hp.com>
Subject Re: online/offline Events
Date Wed, 07 Nov 2012 16:00:15 GMT
Thanks, I'll take a look at that .. Is there an example for a platform
that doesn't use the native bridge e.g webworks or similar? I couldn't
find one

Markus

On 11/7/12 7:27 AM, "Andrew Grieve" <agrieve@chromium.org> wrote:

>Here's the Android impl:
>https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=
>blob;f=framework/src/org/apache/cordova/NetworkManager.java;h=5d8791809227
>877d604c98cf029c26242d9642b8;hb=HEAD
>
>The JS performs a Connection.getConnectionInfo(), and then the native
>plugin returns the connection status but sets "keepCallback" to true.
>Then,
>whenever the connection type changes, it sends another plugin result and
>always sets keepCallback to true.
>
>
>On Wed, Nov 7, 2012 at 9:57 AM, Leutwyler, Markus
><markus.leutwyler@hp.com>wrote:
>
>> I saw that ... but how is that handled by the platform specific plugins?
>>
>> Markus
>>
>> -----Original Message-----
>> From: Simon MacDonald [mailto:simon.macdonald@gmail.com]
>> Sent: Mittwoch, 7. November 2012 15:56
>> To: dev@cordova.apache.org
>> Subject: Re: online/offline Events
>>
>> lolz I didn't read what list this was on. The src for network.js is at:
>>
>>
>> 
>>https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-js.git;a=blob
>>;f=lib/common/plugin/network.js;h=adaba5ae8b6ec825986712d8b99e660105e56ae
>>9;hb=HEAD
>>
>> The way we have it setup is the native side sends the JS side an update
>> whenever the network connection changes. If the type == 'none' then we
>>fire
>> an offline event. Otherwise you fire the online event.
>>
>> Simon Mac Donald
>> http://hi.im/simonmacdonald
>>
>>
>> On Wed, Nov 7, 2012 at 9:47 AM, Leutwyler, Markus
>> <markus.leutwyler@hp.com>wrote:
>>
>> > I was actually looking for a code example (in cordova-js) of a
>> > platform that sends out those events (because I'm investigating how to
>> > add support for those to webOS)
>> >
>> > Markus
>> >
>> > -----Original Message-----
>> > From: Simon MacDonald [mailto:simon.macdonald@gmail.com]
>> > Sent: Mittwoch, 7. November 2012 15:39
>> > To: dev@cordova.apache.org
>> > Subject: Re: online/offline Events
>> >
>> > http://docs.phonegap.com/en/2.2.0/cordova_events_events.md.html#online
>> > http://docs.phonegap.com/en/2.2.0/cordova_events_events.md.html#offlin
>> > e
>> >
>> > Simon Mac Donald
>> > http://hi.im/simonmacdonald
>> >
>> >
>> > On Wed, Nov 7, 2012 at 9:36 AM, Leutwyler, Markus
>> > <markus.leutwyler@hp.com>wrote:
>> >
>> > > Is there a platform that sends out online/offline event to the
>> > > document when the connection status changes? I didn't find any
>> > > examples
>> > >
>> > > Thanks
>> > >
>> > > Markus
>> > >
>> >
>>


Mime
View raw message