You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Tim Kim <ti...@gmail.com> on 2013/06/06 23:37:46 UTC

Android Network Plugin Breakout

Hey gang,

So I'm trying to rip out the android network plugin, but it appears the
android exec relies on the network plugin for online/offline events.

https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;a=blob;f=lib/android/exec.js;h=206c09acb6d939b91e28b8813fa7fe318c2a4483;hb=0a5fa1fa255e12625969cef1aaeecd1582e5b389#l117

I'm not too sure how to cleanly rip out the network plugin stuff from
cordova js without potentially breaking the online/offline events, so I
figured I'd ask for some help. I'm thinking that we move network stuff to
be a core part of android or perhaps not have to rely on the network plugin
somehow.

Related jira issue :
https://issues.apache.org/jira/browse/CB-3509#comment-13677532

-- 
Timothy Kim

Re: Android Network Plugin Breakout

Posted by Joe Bowser <bo...@gmail.com>.
Oh yeah, Test 2.3, 4.0 and 4.1.

On Thu, Jun 6, 2013 at 3:19 PM, Joe Bowser <bo...@gmail.com> wrote:
> The thing is that this may be for the browser, and not for our plugin.
> The event is being hijacked and used to trigger the JS to check the
> queue to see whether or not it should be firing a JS event off in the
> browser when we do a sendJavascript("foo()"); call in Java.  If this
> is the case, then we can rip out our plugin and not worry about it.
>
> So, I'd rip it out, see if we can do online/offline events on the
> WebView without cordova, and then if we can, it should be all good.
>
> On Thu, Jun 6, 2013 at 3:16 PM, Brian LeRoux <b...@brian.io> wrote:
>> Seems simple enough. I find online/offline/pause/resume and other
>> events of the app lifecycle to be plausibly core for all platforms.
>>
>> On Thu, Jun 6, 2013 at 4:44 PM, Joe Bowser <bo...@gmail.com> wrote:
>>> Actually, online/offline has to be core, because it's part of the
>>> bridge.  We can't rip that out because some platform may need the
>>> Online/Offline event bridge.  That's a pretty serious gotcha.  It's
>>> also why it's a problem on Android and not on other platforms.
>>>
>>> Sorry, I don't have any easy answers for this one.
>>>
>>> On Thu, Jun 6, 2013 at 2:41 PM, Joe Bowser <bo...@gmail.com> wrote:
>>>> How is this not a problem for the rest of the platforms?  That's the
>>>> first thing that I'm wondering right now.
>>>>
>>>> On Thu, Jun 6, 2013 at 2:37 PM, Tim Kim <ti...@gmail.com> wrote:
>>>>> Hey gang,
>>>>>
>>>>> So I'm trying to rip out the android network plugin, but it appears the
>>>>> android exec relies on the network plugin for online/offline events.
>>>>>
>>>>> https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;a=blob;f=lib/android/exec.js;h=206c09acb6d939b91e28b8813fa7fe318c2a4483;hb=0a5fa1fa255e12625969cef1aaeecd1582e5b389#l117
>>>>>
>>>>> I'm not too sure how to cleanly rip out the network plugin stuff from
>>>>> cordova js without potentially breaking the online/offline events, so I
>>>>> figured I'd ask for some help. I'm thinking that we move network stuff to
>>>>> be a core part of android or perhaps not have to rely on the network plugin
>>>>> somehow.
>>>>>
>>>>> Related jira issue :
>>>>> https://issues.apache.org/jira/browse/CB-3509#comment-13677532
>>>>>
>>>>> --
>>>>> Timothy Kim

Re: Android Network Plugin Breakout

Posted by Andrew Grieve <ag...@chromium.org>.
For Android, I also don't see how we could separate out the network plugin
without breaking navigator.onLine. However, I think it still may be worth
doing.

1. By default, set navigator.onLine to undefined
2. If they install the network plugin, then have it override the property
so that it works.

There's a lot of skepticism around using online/offline events anyways, so
for that reason I think it makes sense to have it be an optional plugin.

The reason start-up depends on it is that at the bottom of channel.js,
there is:

channel.waitForInitialization('onCordovaConnectionReady');

This line (as well as the creating of the channel) should be moved into the
network.js file.



On Thu, Jun 6, 2013 at 6:40 PM, Steven Gill <st...@gmail.com> wrote:

> The issue is with the javascript code related to the network-information
> plugin and affects ios + android (probably others) from my initial testing.
> If it is doable, we should definitely rip it out.
>
> We could always package up the network-information plugin without any JS
> code and leave the network js code in cordova-js.
>
>
> On Thu, Jun 6, 2013 at 3:33 PM, Joe Bowser <bo...@gmail.com> wrote:
>
> > Wait, aren't all the plugins already broken out on Android now? I
> > don't remember this code being dependent on the plugin itself, just
> > the online/offline event.
> >
> > On Thu, Jun 6, 2013 at 3:30 PM, Brian LeRoux <b...@brian.io> wrote:
> > > sgtm
> > >
> > > On Thu, Jun 6, 2013 at 5:19 PM, Joe Bowser <bo...@gmail.com> wrote:
> > >> The thing is that this may be for the browser, and not for our plugin.
> > >> The event is being hijacked and used to trigger the JS to check the
> > >> queue to see whether or not it should be firing a JS event off in the
> > >> browser when we do a sendJavascript("foo()"); call in Java.  If this
> > >> is the case, then we can rip out our plugin and not worry about it.
> > >>
> > >> So, I'd rip it out, see if we can do online/offline events on the
> > >> WebView without cordova, and then if we can, it should be all good.
> > >>
> > >> On Thu, Jun 6, 2013 at 3:16 PM, Brian LeRoux <b...@brian.io> wrote:
> > >>> Seems simple enough. I find online/offline/pause/resume and other
> > >>> events of the app lifecycle to be plausibly core for all platforms.
> > >>>
> > >>> On Thu, Jun 6, 2013 at 4:44 PM, Joe Bowser <bo...@gmail.com>
> wrote:
> > >>>> Actually, online/offline has to be core, because it's part of the
> > >>>> bridge.  We can't rip that out because some platform may need the
> > >>>> Online/Offline event bridge.  That's a pretty serious gotcha.  It's
> > >>>> also why it's a problem on Android and not on other platforms.
> > >>>>
> > >>>> Sorry, I don't have any easy answers for this one.
> > >>>>
> > >>>> On Thu, Jun 6, 2013 at 2:41 PM, Joe Bowser <bo...@gmail.com>
> wrote:
> > >>>>> How is this not a problem for the rest of the platforms?  That's
> the
> > >>>>> first thing that I'm wondering right now.
> > >>>>>
> > >>>>> On Thu, Jun 6, 2013 at 2:37 PM, Tim Kim <ti...@gmail.com>
> wrote:
> > >>>>>> Hey gang,
> > >>>>>>
> > >>>>>> So I'm trying to rip out the android network plugin, but it
> appears
> > the
> > >>>>>> android exec relies on the network plugin for online/offline
> events.
> > >>>>>>
> > >>>>>>
> >
> https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;a=blob;f=lib/android/exec.js;h=206c09acb6d939b91e28b8813fa7fe318c2a4483;hb=0a5fa1fa255e12625969cef1aaeecd1582e5b389#l117
> > >>>>>>
> > >>>>>> I'm not too sure how to cleanly rip out the network plugin stuff
> > from
> > >>>>>> cordova js without potentially breaking the online/offline events,
> > so I
> > >>>>>> figured I'd ask for some help. I'm thinking that we move network
> > stuff to
> > >>>>>> be a core part of android or perhaps not have to rely on the
> > network plugin
> > >>>>>> somehow.
> > >>>>>>
> > >>>>>> Related jira issue :
> > >>>>>> https://issues.apache.org/jira/browse/CB-3509#comment-13677532
> > >>>>>>
> > >>>>>> --
> > >>>>>> Timothy Kim
> >
>

Re: Android Network Plugin Breakout

Posted by Steven Gill <st...@gmail.com>.
The issue is with the javascript code related to the network-information
plugin and affects ios + android (probably others) from my initial testing.
If it is doable, we should definitely rip it out.

We could always package up the network-information plugin without any JS
code and leave the network js code in cordova-js.


On Thu, Jun 6, 2013 at 3:33 PM, Joe Bowser <bo...@gmail.com> wrote:

> Wait, aren't all the plugins already broken out on Android now? I
> don't remember this code being dependent on the plugin itself, just
> the online/offline event.
>
> On Thu, Jun 6, 2013 at 3:30 PM, Brian LeRoux <b...@brian.io> wrote:
> > sgtm
> >
> > On Thu, Jun 6, 2013 at 5:19 PM, Joe Bowser <bo...@gmail.com> wrote:
> >> The thing is that this may be for the browser, and not for our plugin.
> >> The event is being hijacked and used to trigger the JS to check the
> >> queue to see whether or not it should be firing a JS event off in the
> >> browser when we do a sendJavascript("foo()"); call in Java.  If this
> >> is the case, then we can rip out our plugin and not worry about it.
> >>
> >> So, I'd rip it out, see if we can do online/offline events on the
> >> WebView without cordova, and then if we can, it should be all good.
> >>
> >> On Thu, Jun 6, 2013 at 3:16 PM, Brian LeRoux <b...@brian.io> wrote:
> >>> Seems simple enough. I find online/offline/pause/resume and other
> >>> events of the app lifecycle to be plausibly core for all platforms.
> >>>
> >>> On Thu, Jun 6, 2013 at 4:44 PM, Joe Bowser <bo...@gmail.com> wrote:
> >>>> Actually, online/offline has to be core, because it's part of the
> >>>> bridge.  We can't rip that out because some platform may need the
> >>>> Online/Offline event bridge.  That's a pretty serious gotcha.  It's
> >>>> also why it's a problem on Android and not on other platforms.
> >>>>
> >>>> Sorry, I don't have any easy answers for this one.
> >>>>
> >>>> On Thu, Jun 6, 2013 at 2:41 PM, Joe Bowser <bo...@gmail.com> wrote:
> >>>>> How is this not a problem for the rest of the platforms?  That's the
> >>>>> first thing that I'm wondering right now.
> >>>>>
> >>>>> On Thu, Jun 6, 2013 at 2:37 PM, Tim Kim <ti...@gmail.com> wrote:
> >>>>>> Hey gang,
> >>>>>>
> >>>>>> So I'm trying to rip out the android network plugin, but it appears
> the
> >>>>>> android exec relies on the network plugin for online/offline events.
> >>>>>>
> >>>>>>
> https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;a=blob;f=lib/android/exec.js;h=206c09acb6d939b91e28b8813fa7fe318c2a4483;hb=0a5fa1fa255e12625969cef1aaeecd1582e5b389#l117
> >>>>>>
> >>>>>> I'm not too sure how to cleanly rip out the network plugin stuff
> from
> >>>>>> cordova js without potentially breaking the online/offline events,
> so I
> >>>>>> figured I'd ask for some help. I'm thinking that we move network
> stuff to
> >>>>>> be a core part of android or perhaps not have to rely on the
> network plugin
> >>>>>> somehow.
> >>>>>>
> >>>>>> Related jira issue :
> >>>>>> https://issues.apache.org/jira/browse/CB-3509#comment-13677532
> >>>>>>
> >>>>>> --
> >>>>>> Timothy Kim
>

Re: Android Network Plugin Breakout

Posted by Joe Bowser <bo...@gmail.com>.
Wait, aren't all the plugins already broken out on Android now? I
don't remember this code being dependent on the plugin itself, just
the online/offline event.

On Thu, Jun 6, 2013 at 3:30 PM, Brian LeRoux <b...@brian.io> wrote:
> sgtm
>
> On Thu, Jun 6, 2013 at 5:19 PM, Joe Bowser <bo...@gmail.com> wrote:
>> The thing is that this may be for the browser, and not for our plugin.
>> The event is being hijacked and used to trigger the JS to check the
>> queue to see whether or not it should be firing a JS event off in the
>> browser when we do a sendJavascript("foo()"); call in Java.  If this
>> is the case, then we can rip out our plugin and not worry about it.
>>
>> So, I'd rip it out, see if we can do online/offline events on the
>> WebView without cordova, and then if we can, it should be all good.
>>
>> On Thu, Jun 6, 2013 at 3:16 PM, Brian LeRoux <b...@brian.io> wrote:
>>> Seems simple enough. I find online/offline/pause/resume and other
>>> events of the app lifecycle to be plausibly core for all platforms.
>>>
>>> On Thu, Jun 6, 2013 at 4:44 PM, Joe Bowser <bo...@gmail.com> wrote:
>>>> Actually, online/offline has to be core, because it's part of the
>>>> bridge.  We can't rip that out because some platform may need the
>>>> Online/Offline event bridge.  That's a pretty serious gotcha.  It's
>>>> also why it's a problem on Android and not on other platforms.
>>>>
>>>> Sorry, I don't have any easy answers for this one.
>>>>
>>>> On Thu, Jun 6, 2013 at 2:41 PM, Joe Bowser <bo...@gmail.com> wrote:
>>>>> How is this not a problem for the rest of the platforms?  That's the
>>>>> first thing that I'm wondering right now.
>>>>>
>>>>> On Thu, Jun 6, 2013 at 2:37 PM, Tim Kim <ti...@gmail.com> wrote:
>>>>>> Hey gang,
>>>>>>
>>>>>> So I'm trying to rip out the android network plugin, but it appears the
>>>>>> android exec relies on the network plugin for online/offline events.
>>>>>>
>>>>>> https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;a=blob;f=lib/android/exec.js;h=206c09acb6d939b91e28b8813fa7fe318c2a4483;hb=0a5fa1fa255e12625969cef1aaeecd1582e5b389#l117
>>>>>>
>>>>>> I'm not too sure how to cleanly rip out the network plugin stuff from
>>>>>> cordova js without potentially breaking the online/offline events, so I
>>>>>> figured I'd ask for some help. I'm thinking that we move network stuff to
>>>>>> be a core part of android or perhaps not have to rely on the network plugin
>>>>>> somehow.
>>>>>>
>>>>>> Related jira issue :
>>>>>> https://issues.apache.org/jira/browse/CB-3509#comment-13677532
>>>>>>
>>>>>> --
>>>>>> Timothy Kim

Re: Android Network Plugin Breakout

Posted by Brian LeRoux <b...@brian.io>.
sgtm

On Thu, Jun 6, 2013 at 5:19 PM, Joe Bowser <bo...@gmail.com> wrote:
> The thing is that this may be for the browser, and not for our plugin.
> The event is being hijacked and used to trigger the JS to check the
> queue to see whether or not it should be firing a JS event off in the
> browser when we do a sendJavascript("foo()"); call in Java.  If this
> is the case, then we can rip out our plugin and not worry about it.
>
> So, I'd rip it out, see if we can do online/offline events on the
> WebView without cordova, and then if we can, it should be all good.
>
> On Thu, Jun 6, 2013 at 3:16 PM, Brian LeRoux <b...@brian.io> wrote:
>> Seems simple enough. I find online/offline/pause/resume and other
>> events of the app lifecycle to be plausibly core for all platforms.
>>
>> On Thu, Jun 6, 2013 at 4:44 PM, Joe Bowser <bo...@gmail.com> wrote:
>>> Actually, online/offline has to be core, because it's part of the
>>> bridge.  We can't rip that out because some platform may need the
>>> Online/Offline event bridge.  That's a pretty serious gotcha.  It's
>>> also why it's a problem on Android and not on other platforms.
>>>
>>> Sorry, I don't have any easy answers for this one.
>>>
>>> On Thu, Jun 6, 2013 at 2:41 PM, Joe Bowser <bo...@gmail.com> wrote:
>>>> How is this not a problem for the rest of the platforms?  That's the
>>>> first thing that I'm wondering right now.
>>>>
>>>> On Thu, Jun 6, 2013 at 2:37 PM, Tim Kim <ti...@gmail.com> wrote:
>>>>> Hey gang,
>>>>>
>>>>> So I'm trying to rip out the android network plugin, but it appears the
>>>>> android exec relies on the network plugin for online/offline events.
>>>>>
>>>>> https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;a=blob;f=lib/android/exec.js;h=206c09acb6d939b91e28b8813fa7fe318c2a4483;hb=0a5fa1fa255e12625969cef1aaeecd1582e5b389#l117
>>>>>
>>>>> I'm not too sure how to cleanly rip out the network plugin stuff from
>>>>> cordova js without potentially breaking the online/offline events, so I
>>>>> figured I'd ask for some help. I'm thinking that we move network stuff to
>>>>> be a core part of android or perhaps not have to rely on the network plugin
>>>>> somehow.
>>>>>
>>>>> Related jira issue :
>>>>> https://issues.apache.org/jira/browse/CB-3509#comment-13677532
>>>>>
>>>>> --
>>>>> Timothy Kim

Re: Android Network Plugin Breakout

Posted by Joe Bowser <bo...@gmail.com>.
The thing is that this may be for the browser, and not for our plugin.
The event is being hijacked and used to trigger the JS to check the
queue to see whether or not it should be firing a JS event off in the
browser when we do a sendJavascript("foo()"); call in Java.  If this
is the case, then we can rip out our plugin and not worry about it.

So, I'd rip it out, see if we can do online/offline events on the
WebView without cordova, and then if we can, it should be all good.

On Thu, Jun 6, 2013 at 3:16 PM, Brian LeRoux <b...@brian.io> wrote:
> Seems simple enough. I find online/offline/pause/resume and other
> events of the app lifecycle to be plausibly core for all platforms.
>
> On Thu, Jun 6, 2013 at 4:44 PM, Joe Bowser <bo...@gmail.com> wrote:
>> Actually, online/offline has to be core, because it's part of the
>> bridge.  We can't rip that out because some platform may need the
>> Online/Offline event bridge.  That's a pretty serious gotcha.  It's
>> also why it's a problem on Android and not on other platforms.
>>
>> Sorry, I don't have any easy answers for this one.
>>
>> On Thu, Jun 6, 2013 at 2:41 PM, Joe Bowser <bo...@gmail.com> wrote:
>>> How is this not a problem for the rest of the platforms?  That's the
>>> first thing that I'm wondering right now.
>>>
>>> On Thu, Jun 6, 2013 at 2:37 PM, Tim Kim <ti...@gmail.com> wrote:
>>>> Hey gang,
>>>>
>>>> So I'm trying to rip out the android network plugin, but it appears the
>>>> android exec relies on the network plugin for online/offline events.
>>>>
>>>> https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;a=blob;f=lib/android/exec.js;h=206c09acb6d939b91e28b8813fa7fe318c2a4483;hb=0a5fa1fa255e12625969cef1aaeecd1582e5b389#l117
>>>>
>>>> I'm not too sure how to cleanly rip out the network plugin stuff from
>>>> cordova js without potentially breaking the online/offline events, so I
>>>> figured I'd ask for some help. I'm thinking that we move network stuff to
>>>> be a core part of android or perhaps not have to rely on the network plugin
>>>> somehow.
>>>>
>>>> Related jira issue :
>>>> https://issues.apache.org/jira/browse/CB-3509#comment-13677532
>>>>
>>>> --
>>>> Timothy Kim

Re: Android Network Plugin Breakout

Posted by Brian LeRoux <b...@brian.io>.
agree to this, but also agree w/ joe that we should try and remove
completely (if testing the browser handles correctly 2.3+)

On Thu, Jun 6, 2013 at 5:25 PM, Steven Gill <st...@gmail.com> wrote:
> We should leave network code in core. Maybe this is something we revisit
> later on if we want to make network information its own plugin and are
> willing to do the changes required to do so (No idea what that would
> involve).
>
> If we aren't ripping it out of Android, we shouldn't rip it out for the
> other platforms.
>
>
> On Thu, Jun 6, 2013 at 3:16 PM, Brian LeRoux <b...@brian.io> wrote:
>
>> Seems simple enough. I find online/offline/pause/resume and other
>> events of the app lifecycle to be plausibly core for all platforms.
>>
>> On Thu, Jun 6, 2013 at 4:44 PM, Joe Bowser <bo...@gmail.com> wrote:
>> > Actually, online/offline has to be core, because it's part of the
>> > bridge.  We can't rip that out because some platform may need the
>> > Online/Offline event bridge.  That's a pretty serious gotcha.  It's
>> > also why it's a problem on Android and not on other platforms.
>> >
>> > Sorry, I don't have any easy answers for this one.
>> >
>> > On Thu, Jun 6, 2013 at 2:41 PM, Joe Bowser <bo...@gmail.com> wrote:
>> >> How is this not a problem for the rest of the platforms?  That's the
>> >> first thing that I'm wondering right now.
>> >>
>> >> On Thu, Jun 6, 2013 at 2:37 PM, Tim Kim <ti...@gmail.com> wrote:
>> >>> Hey gang,
>> >>>
>> >>> So I'm trying to rip out the android network plugin, but it appears the
>> >>> android exec relies on the network plugin for online/offline events.
>> >>>
>> >>>
>> https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;a=blob;f=lib/android/exec.js;h=206c09acb6d939b91e28b8813fa7fe318c2a4483;hb=0a5fa1fa255e12625969cef1aaeecd1582e5b389#l117
>> >>>
>> >>> I'm not too sure how to cleanly rip out the network plugin stuff from
>> >>> cordova js without potentially breaking the online/offline events, so I
>> >>> figured I'd ask for some help. I'm thinking that we move network stuff
>> to
>> >>> be a core part of android or perhaps not have to rely on the network
>> plugin
>> >>> somehow.
>> >>>
>> >>> Related jira issue :
>> >>> https://issues.apache.org/jira/browse/CB-3509#comment-13677532
>> >>>
>> >>> --
>> >>> Timothy Kim
>>

Re: Android Network Plugin Breakout

Posted by Steven Gill <st...@gmail.com>.
We should leave network code in core. Maybe this is something we revisit
later on if we want to make network information its own plugin and are
willing to do the changes required to do so (No idea what that would
involve).

If we aren't ripping it out of Android, we shouldn't rip it out for the
other platforms.


On Thu, Jun 6, 2013 at 3:16 PM, Brian LeRoux <b...@brian.io> wrote:

> Seems simple enough. I find online/offline/pause/resume and other
> events of the app lifecycle to be plausibly core for all platforms.
>
> On Thu, Jun 6, 2013 at 4:44 PM, Joe Bowser <bo...@gmail.com> wrote:
> > Actually, online/offline has to be core, because it's part of the
> > bridge.  We can't rip that out because some platform may need the
> > Online/Offline event bridge.  That's a pretty serious gotcha.  It's
> > also why it's a problem on Android and not on other platforms.
> >
> > Sorry, I don't have any easy answers for this one.
> >
> > On Thu, Jun 6, 2013 at 2:41 PM, Joe Bowser <bo...@gmail.com> wrote:
> >> How is this not a problem for the rest of the platforms?  That's the
> >> first thing that I'm wondering right now.
> >>
> >> On Thu, Jun 6, 2013 at 2:37 PM, Tim Kim <ti...@gmail.com> wrote:
> >>> Hey gang,
> >>>
> >>> So I'm trying to rip out the android network plugin, but it appears the
> >>> android exec relies on the network plugin for online/offline events.
> >>>
> >>>
> https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;a=blob;f=lib/android/exec.js;h=206c09acb6d939b91e28b8813fa7fe318c2a4483;hb=0a5fa1fa255e12625969cef1aaeecd1582e5b389#l117
> >>>
> >>> I'm not too sure how to cleanly rip out the network plugin stuff from
> >>> cordova js without potentially breaking the online/offline events, so I
> >>> figured I'd ask for some help. I'm thinking that we move network stuff
> to
> >>> be a core part of android or perhaps not have to rely on the network
> plugin
> >>> somehow.
> >>>
> >>> Related jira issue :
> >>> https://issues.apache.org/jira/browse/CB-3509#comment-13677532
> >>>
> >>> --
> >>> Timothy Kim
>

Re: Android Network Plugin Breakout

Posted by Brian LeRoux <b...@brian.io>.
Seems simple enough. I find online/offline/pause/resume and other
events of the app lifecycle to be plausibly core for all platforms.

On Thu, Jun 6, 2013 at 4:44 PM, Joe Bowser <bo...@gmail.com> wrote:
> Actually, online/offline has to be core, because it's part of the
> bridge.  We can't rip that out because some platform may need the
> Online/Offline event bridge.  That's a pretty serious gotcha.  It's
> also why it's a problem on Android and not on other platforms.
>
> Sorry, I don't have any easy answers for this one.
>
> On Thu, Jun 6, 2013 at 2:41 PM, Joe Bowser <bo...@gmail.com> wrote:
>> How is this not a problem for the rest of the platforms?  That's the
>> first thing that I'm wondering right now.
>>
>> On Thu, Jun 6, 2013 at 2:37 PM, Tim Kim <ti...@gmail.com> wrote:
>>> Hey gang,
>>>
>>> So I'm trying to rip out the android network plugin, but it appears the
>>> android exec relies on the network plugin for online/offline events.
>>>
>>> https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;a=blob;f=lib/android/exec.js;h=206c09acb6d939b91e28b8813fa7fe318c2a4483;hb=0a5fa1fa255e12625969cef1aaeecd1582e5b389#l117
>>>
>>> I'm not too sure how to cleanly rip out the network plugin stuff from
>>> cordova js without potentially breaking the online/offline events, so I
>>> figured I'd ask for some help. I'm thinking that we move network stuff to
>>> be a core part of android or perhaps not have to rely on the network plugin
>>> somehow.
>>>
>>> Related jira issue :
>>> https://issues.apache.org/jira/browse/CB-3509#comment-13677532
>>>
>>> --
>>> Timothy Kim

Re: Android Network Plugin Breakout

Posted by Tim Kim <ti...@gmail.com>.
>
> How is this not a problem for the rest of the platforms?  That's the
> first thing that I'm wondering right now.

I think ios' deviceready event also doesn't fire, but I'm not sure if it's
for the same reasons - haven't gone down that rabbit hole yet.

As for bb10, I'm not sure anymore since it has changed with the new bb10
repo. It used to rely on some webworks stuff.

Actually, online/offline has to be core, because it's part of the
> bridge.  We can't rip that out because some platform may need the
> Online/Offline event bridge.  That's a pretty serious gotcha.  It's
> also why it's a problem on Android and not on other platforms.

Hrm, if it's the case where we have it as core in Android, should we also
have in core for the other platforms?

-- 
Timothy Kim

Re: Android Network Plugin Breakout

Posted by Joe Bowser <bo...@gmail.com>.
Actually, online/offline has to be core, because it's part of the
bridge.  We can't rip that out because some platform may need the
Online/Offline event bridge.  That's a pretty serious gotcha.  It's
also why it's a problem on Android and not on other platforms.

Sorry, I don't have any easy answers for this one.

On Thu, Jun 6, 2013 at 2:41 PM, Joe Bowser <bo...@gmail.com> wrote:
> How is this not a problem for the rest of the platforms?  That's the
> first thing that I'm wondering right now.
>
> On Thu, Jun 6, 2013 at 2:37 PM, Tim Kim <ti...@gmail.com> wrote:
>> Hey gang,
>>
>> So I'm trying to rip out the android network plugin, but it appears the
>> android exec relies on the network plugin for online/offline events.
>>
>> https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;a=blob;f=lib/android/exec.js;h=206c09acb6d939b91e28b8813fa7fe318c2a4483;hb=0a5fa1fa255e12625969cef1aaeecd1582e5b389#l117
>>
>> I'm not too sure how to cleanly rip out the network plugin stuff from
>> cordova js without potentially breaking the online/offline events, so I
>> figured I'd ask for some help. I'm thinking that we move network stuff to
>> be a core part of android or perhaps not have to rely on the network plugin
>> somehow.
>>
>> Related jira issue :
>> https://issues.apache.org/jira/browse/CB-3509#comment-13677532
>>
>> --
>> Timothy Kim

Re: Android Network Plugin Breakout

Posted by Joe Bowser <bo...@gmail.com>.
How is this not a problem for the rest of the platforms?  That's the
first thing that I'm wondering right now.

On Thu, Jun 6, 2013 at 2:37 PM, Tim Kim <ti...@gmail.com> wrote:
> Hey gang,
>
> So I'm trying to rip out the android network plugin, but it appears the
> android exec relies on the network plugin for online/offline events.
>
> https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;a=blob;f=lib/android/exec.js;h=206c09acb6d939b91e28b8813fa7fe318c2a4483;hb=0a5fa1fa255e12625969cef1aaeecd1582e5b389#l117
>
> I'm not too sure how to cleanly rip out the network plugin stuff from
> cordova js without potentially breaking the online/offline events, so I
> figured I'd ask for some help. I'm thinking that we move network stuff to
> be a core part of android or perhaps not have to rely on the network plugin
> somehow.
>
> Related jira issue :
> https://issues.apache.org/jira/browse/CB-3509#comment-13677532
>
> --
> Timothy Kim