You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Simon MacDonald (JIRA)" <ji...@apache.org> on 2012/11/09 17:30:12 UTC

[jira] [Resolved] (CB-1829) Online/Offline events do not fire on subsequent pages of an app

     [ https://issues.apache.org/jira/browse/CB-1829?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon MacDonald resolved CB-1829.
---------------------------------

    Resolution: Fixed

Removed the onReset method as we shouldn't be calling onDestroy when we leave a page. Only when we leave the app.
                
> Online/Offline events do not fire on subsequent pages of an app
> ---------------------------------------------------------------
>
>                 Key: CB-1829
>                 URL: https://issues.apache.org/jira/browse/CB-1829
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>            Reporter: Simon MacDonald
>            Assignee: Simon MacDonald
>            Priority: Critical
>             Fix For: 2.3.0
>
>
> The move to CordovaPlugin has broken the online/offline events. The old plugin code called setContext on every page entry and onDestroy every time you leave the page. Now initialize is called only on the load of the first page, so when onDestroy is called when you leave that page the network listener is unregistered and never re-created on the next page.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira