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

[jira] [Created] (CB-1846) Offline event doesn't work

Remzi Cavdar created CB-1846:
--------------------------------

             Summary: Offline event doesn't work
                 Key: CB-1846
                 URL: https://issues.apache.org/jira/browse/CB-1846
             Project: Apache Cordova
          Issue Type: Bug
          Components: Android
    Affects Versions: 2.2.0
         Environment: Samsung Galaxy S2 and Google Nexus 7
            Reporter: Remzi Cavdar
            Assignee: Joe Bowser
             Fix For: 2.2.0


The offline event doesn't work and I had said this before release, but you guys wanted to release PhoneGap 2.2.0 

This is my code:


document.addEventListener("deviceready", onDeviceReady, false);

function onDeviceReady() {
	document.addEventListener("offline", function() {
		alert("Er is geen internet verbinding!\nSchakel Wifi of 3G in");
	}, false);
}

/* English: alert("No internet connection!\nPlease turn on Wifi or 3G");  */

--
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

[jira] [Commented] (CB-1846) Offline event doesn't work

Posted by "Simon MacDonald (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497128#comment-13497128 ] 

Simon MacDonald commented on CB-1846:
-------------------------------------

Quick question, is this on the first page of your app or on a secondary page? The reason I ask is I just fixed a bug similar to this for all subsequent pages in the app.
                
> Offline event doesn't work
> --------------------------
>
>                 Key: CB-1846
>                 URL: https://issues.apache.org/jira/browse/CB-1846
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>         Environment: Samsung Galaxy S2 and Google Nexus 7
>            Reporter: Remzi Cavdar
>            Assignee: Joe Bowser
>             Fix For: 2.2.0
>
>
> The offline event doesn't work and I had said this before release, but you guys wanted to release PhoneGap 2.2.0 
> This is my code:
> document.addEventListener("deviceready", onDeviceReady, false);
> function onDeviceReady() {
> 	document.addEventListener("offline", function() {
> 		alert("Er is geen internet verbinding!\nSchakel Wifi of 3G in");
> 	}, false);
> }
> /* English: alert("No internet connection!\nPlease turn on Wifi or 3G");  */

--
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

[jira] [Commented] (CB-1846) Offline event doesn't work

Posted by "Simon MacDonald (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497456#comment-13497456 ] 

Simon MacDonald commented on CB-1846:
-------------------------------------

Can someone else give this a try? I can't reproduce this bug on my first page of my app. Subsequent pages yes, which is covered by this bug:

https://issues.apache.org/jira/browse/CB-1829
                
> Offline event doesn't work
> --------------------------
>
>                 Key: CB-1846
>                 URL: https://issues.apache.org/jira/browse/CB-1846
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>         Environment: Samsung Galaxy S2 and Google Nexus 7
>            Reporter: Remzi Cavdar
>            Assignee: Joe Bowser
>             Fix For: 2.2.0
>
>
> The offline event doesn't work and I had said this before release, but you guys wanted to release PhoneGap 2.2.0 
> This is my code:
> document.addEventListener("deviceready", onDeviceReady, false);
> function onDeviceReady() {
> 	document.addEventListener("offline", function() {
> 		alert("Er is geen internet verbinding!\nSchakel Wifi of 3G in");
> 	}, false);
> }
> /* English: alert("No internet connection!\nPlease turn on Wifi or 3G");  */

--
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

[jira] [Resolved] (CB-1846) Offline event doesn't work

Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bowser resolved CB-1846.
----------------------------

    Resolution: Not A Problem

The purpose of this issue tracker is to track issues with Cordova, it is not to issue free technical support.  Three developers have looked into this issue, tested with the same devices as you and have determined that the issue is with your app. 

If you need assistance with your application, please use the PhoneGap Google Group (https://groups.google.com/forum/?fromgroups=#!forum/phonegap) or on Stack Overflow.  Please do not re-open this bug, as it is distracting and you most likely will not get help with your application if you keep doing this.
                
> Offline event doesn't work
> --------------------------
>
>                 Key: CB-1846
>                 URL: https://issues.apache.org/jira/browse/CB-1846
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>         Environment: Samsung Galaxy S2 and Google Nexus 7
>            Reporter: Remzi Cavdar
>            Assignee: Joe Bowser
>             Fix For: 2.2.0
>
>         Attachments: Menofood-2.zip
>
>
> The offline event doesn't work and I had said this before release, but you guys wanted to release PhoneGap 2.2.0 
> This is my code:
> document.addEventListener("deviceready", onDeviceReady, false);
> function onDeviceReady() {
> 	document.addEventListener("offline", function() {
> 		alert("Er is geen internet verbinding!\nSchakel Wifi of 3G in");
> 	}, false);
> }
> /* English: alert("No internet connection!\nPlease turn on Wifi or 3G");  */

--
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

[jira] [Commented] (CB-1846) Offline event doesn't work

Posted by "Remzi Cavdar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497855#comment-13497855 ] 

Remzi Cavdar commented on CB-1846:
----------------------------------

So can anyone look at the code?
I have attached a .zip file with my code.
                
> Offline event doesn't work
> --------------------------
>
>                 Key: CB-1846
>                 URL: https://issues.apache.org/jira/browse/CB-1846
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>         Environment: Samsung Galaxy S2 and Google Nexus 7
>            Reporter: Remzi Cavdar
>            Assignee: Joe Bowser
>             Fix For: 2.2.0
>
>         Attachments: Menofood BETA.zip
>
>
> The offline event doesn't work and I had said this before release, but you guys wanted to release PhoneGap 2.2.0 
> This is my code:
> document.addEventListener("deviceready", onDeviceReady, false);
> function onDeviceReady() {
> 	document.addEventListener("offline", function() {
> 		alert("Er is geen internet verbinding!\nSchakel Wifi of 3G in");
> 	}, false);
> }
> /* English: alert("No internet connection!\nPlease turn on Wifi or 3G");  */

--
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

[jira] [Commented] (CB-1846) Offline event doesn't work

Posted by "Remzi Cavdar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497135#comment-13497135 ] 

Remzi Cavdar commented on CB-1846:
----------------------------------

I use this for every html page of my app :P
                
> Offline event doesn't work
> --------------------------
>
>                 Key: CB-1846
>                 URL: https://issues.apache.org/jira/browse/CB-1846
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>         Environment: Samsung Galaxy S2 and Google Nexus 7
>            Reporter: Remzi Cavdar
>            Assignee: Joe Bowser
>             Fix For: 2.2.0
>
>
> The offline event doesn't work and I had said this before release, but you guys wanted to release PhoneGap 2.2.0 
> This is my code:
> document.addEventListener("deviceready", onDeviceReady, false);
> function onDeviceReady() {
> 	document.addEventListener("offline", function() {
> 		alert("Er is geen internet verbinding!\nSchakel Wifi of 3G in");
> 	}, false);
> }
> /* English: alert("No internet connection!\nPlease turn on Wifi or 3G");  */

--
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

[jira] [Commented] (CB-1846) Offline event doesn't work

Posted by "Remzi Cavdar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497105#comment-13497105 ] 

Remzi Cavdar commented on CB-1846:
----------------------------------

It also doesn't work if I use the example code:


    <script type="text/javascript" charset="utf-8">

    // Call onDeviceReady when Cordova is loaded.
    //
    // At this point, the document has loaded but cordova-2.2.0.js has not.
    // When Cordova is loaded and talking with the native device,
    // it will call the event `deviceready`.
    //
    function onLoad() {
        document.addEventListener("deviceready", onDeviceReady, false);
    }

    // Cordova is loaded and it is now safe to make calls Cordova methods
    //
    function onDeviceReady() {
        document.addEventListener("offline", onOffline, false);
    }

    // Handle the offline event
    //
    function onOffline() {
    }

    </script>


http://docs.phonegap.com/en/2.2.0/cordova_events_events.md.html#offline
                
> Offline event doesn't work
> --------------------------
>
>                 Key: CB-1846
>                 URL: https://issues.apache.org/jira/browse/CB-1846
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>         Environment: Samsung Galaxy S2 and Google Nexus 7
>            Reporter: Remzi Cavdar
>            Assignee: Joe Bowser
>             Fix For: 2.2.0
>
>
> The offline event doesn't work and I had said this before release, but you guys wanted to release PhoneGap 2.2.0 
> This is my code:
> document.addEventListener("deviceready", onDeviceReady, false);
> function onDeviceReady() {
> 	document.addEventListener("offline", function() {
> 		alert("Er is geen internet verbinding!\nSchakel Wifi of 3G in");
> 	}, false);
> }
> /* English: alert("No internet connection!\nPlease turn on Wifi or 3G");  */

--
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

[jira] [Comment Edited] (CB-1846) Offline event doesn't work

Posted by "Remzi Cavdar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497105#comment-13497105 ] 

Remzi Cavdar edited comment on CB-1846 at 11/14/12 1:58 PM:
------------------------------------------------------------

It also doesn't work if I use the example code:


    <script type="text/javascript" charset="utf-8">

    // Call onDeviceReady when Cordova is loaded.
    //
    // At this point, the document has loaded but cordova-2.2.0.js has not.
    // When Cordova is loaded and talking with the native device,
    // it will call the event `deviceready`.
    //
    function onLoad() {
        document.addEventListener("deviceready", onDeviceReady, false);
    }

    // Cordova is loaded and it is now safe to make calls Cordova methods
    //
    function onDeviceReady() {
        document.addEventListener("offline", onOffline, false);
    }

    // Handle the offline event
    //
    function onOffline() {
         
          alert("Er is geen internet verbinding!\nSchakel Wifi of 3G in");
    }

    </script>


http://docs.phonegap.com/en/2.2.0/cordova_events_events.md.html#offline
                
      was (Author: remzicavdar):
    It also doesn't work if I use the example code:


    <script type="text/javascript" charset="utf-8">

    // Call onDeviceReady when Cordova is loaded.
    //
    // At this point, the document has loaded but cordova-2.2.0.js has not.
    // When Cordova is loaded and talking with the native device,
    // it will call the event `deviceready`.
    //
    function onLoad() {
        document.addEventListener("deviceready", onDeviceReady, false);
    }

    // Cordova is loaded and it is now safe to make calls Cordova methods
    //
    function onDeviceReady() {
        document.addEventListener("offline", onOffline, false);
    }

    // Handle the offline event
    //
    function onOffline() {
         alert("Er is geen internet verbinding!\nSchakel Wifi of 3G in");
    }

    </script>


http://docs.phonegap.com/en/2.2.0/cordova_events_events.md.html#offline
                  
> Offline event doesn't work
> --------------------------
>
>                 Key: CB-1846
>                 URL: https://issues.apache.org/jira/browse/CB-1846
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>         Environment: Samsung Galaxy S2 and Google Nexus 7
>            Reporter: Remzi Cavdar
>            Assignee: Joe Bowser
>             Fix For: 2.2.0
>
>
> The offline event doesn't work and I had said this before release, but you guys wanted to release PhoneGap 2.2.0 
> This is my code:
> document.addEventListener("deviceready", onDeviceReady, false);
> function onDeviceReady() {
> 	document.addEventListener("offline", function() {
> 		alert("Er is geen internet verbinding!\nSchakel Wifi of 3G in");
> 	}, false);
> }
> /* English: alert("No internet connection!\nPlease turn on Wifi or 3G");  */

--
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

[jira] [Reopened] (CB-1846) Offline event doesn't work

Posted by "Remzi Cavdar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Remzi Cavdar reopened CB-1846:
------------------------------


But why the code doesn't work for me?

And I use Google Nexus 7 with Android 4.1.2

And Samsung Galaxy S2 with Android 4.0.3

So there is an problem?
                
> Offline event doesn't work
> --------------------------
>
>                 Key: CB-1846
>                 URL: https://issues.apache.org/jira/browse/CB-1846
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>         Environment: Samsung Galaxy S2 and Google Nexus 7
>            Reporter: Remzi Cavdar
>            Assignee: Joe Bowser
>             Fix For: 2.2.0
>
>
> The offline event doesn't work and I had said this before release, but you guys wanted to release PhoneGap 2.2.0 
> This is my code:
> document.addEventListener("deviceready", onDeviceReady, false);
> function onDeviceReady() {
> 	document.addEventListener("offline", function() {
> 		alert("Er is geen internet verbinding!\nSchakel Wifi of 3G in");
> 	}, false);
> }
> /* English: alert("No internet connection!\nPlease turn on Wifi or 3G");  */

--
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

[jira] [Commented] (CB-1846) Offline event doesn't work

Posted by "Remzi Cavdar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497134#comment-13497134 ] 

Remzi Cavdar commented on CB-1846:
----------------------------------

Both
                
> Offline event doesn't work
> --------------------------
>
>                 Key: CB-1846
>                 URL: https://issues.apache.org/jira/browse/CB-1846
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>         Environment: Samsung Galaxy S2 and Google Nexus 7
>            Reporter: Remzi Cavdar
>            Assignee: Joe Bowser
>             Fix For: 2.2.0
>
>
> The offline event doesn't work and I had said this before release, but you guys wanted to release PhoneGap 2.2.0 
> This is my code:
> document.addEventListener("deviceready", onDeviceReady, false);
> function onDeviceReady() {
> 	document.addEventListener("offline", function() {
> 		alert("Er is geen internet verbinding!\nSchakel Wifi of 3G in");
> 	}, false);
> }
> /* English: alert("No internet connection!\nPlease turn on Wifi or 3G");  */

--
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

[jira] [Comment Edited] (CB-1846) Offline event doesn't work

Posted by "Remzi Cavdar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497105#comment-13497105 ] 

Remzi Cavdar edited comment on CB-1846 at 11/14/12 1:57 PM:
------------------------------------------------------------

It also doesn't work if I use the example code:


    <script type="text/javascript" charset="utf-8">

    // Call onDeviceReady when Cordova is loaded.
    //
    // At this point, the document has loaded but cordova-2.2.0.js has not.
    // When Cordova is loaded and talking with the native device,
    // it will call the event `deviceready`.
    //
    function onLoad() {
        document.addEventListener("deviceready", onDeviceReady, false);
    }

    // Cordova is loaded and it is now safe to make calls Cordova methods
    //
    function onDeviceReady() {
        document.addEventListener("offline", onOffline, false);
    }

    // Handle the offline event
    //
    function onOffline() {
         alert("Er is geen internet verbinding!\nSchakel Wifi of 3G in");
    }

    </script>


http://docs.phonegap.com/en/2.2.0/cordova_events_events.md.html#offline
                
      was (Author: remzicavdar):
    It also doesn't work if I use the example code:


    <script type="text/javascript" charset="utf-8">

    // Call onDeviceReady when Cordova is loaded.
    //
    // At this point, the document has loaded but cordova-2.2.0.js has not.
    // When Cordova is loaded and talking with the native device,
    // it will call the event `deviceready`.
    //
    function onLoad() {
        document.addEventListener("deviceready", onDeviceReady, false);
    }

    // Cordova is loaded and it is now safe to make calls Cordova methods
    //
    function onDeviceReady() {
        document.addEventListener("offline", onOffline, false);
    }

    // Handle the offline event
    //
    function onOffline() {
    }

    </script>


http://docs.phonegap.com/en/2.2.0/cordova_events_events.md.html#offline
                  
> Offline event doesn't work
> --------------------------
>
>                 Key: CB-1846
>                 URL: https://issues.apache.org/jira/browse/CB-1846
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>         Environment: Samsung Galaxy S2 and Google Nexus 7
>            Reporter: Remzi Cavdar
>            Assignee: Joe Bowser
>             Fix For: 2.2.0
>
>
> The offline event doesn't work and I had said this before release, but you guys wanted to release PhoneGap 2.2.0 
> This is my code:
> document.addEventListener("deviceready", onDeviceReady, false);
> function onDeviceReady() {
> 	document.addEventListener("offline", function() {
> 		alert("Er is geen internet verbinding!\nSchakel Wifi of 3G in");
> 	}, false);
> }
> /* English: alert("No internet connection!\nPlease turn on Wifi or 3G");  */

--
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

[jira] [Updated] (CB-1846) Offline event doesn't work

Posted by "Remzi Cavdar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Remzi Cavdar updated CB-1846:
-----------------------------

    Attachment: Menofood BETA.zip

We are making an application, which uses this offline event of Codova.

This is Copyrighted work if my boss finds out. if someone other is using this idea or he gets to know, then I'm fucked, so please don't share it to the world.
                
> Offline event doesn't work
> --------------------------
>
>                 Key: CB-1846
>                 URL: https://issues.apache.org/jira/browse/CB-1846
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>         Environment: Samsung Galaxy S2 and Google Nexus 7
>            Reporter: Remzi Cavdar
>            Assignee: Joe Bowser
>             Fix For: 2.2.0
>
>         Attachments: Menofood BETA.zip
>
>
> The offline event doesn't work and I had said this before release, but you guys wanted to release PhoneGap 2.2.0 
> This is my code:
> document.addEventListener("deviceready", onDeviceReady, false);
> function onDeviceReady() {
> 	document.addEventListener("offline", function() {
> 		alert("Er is geen internet verbinding!\nSchakel Wifi of 3G in");
> 	}, false);
> }
> /* English: alert("No internet connection!\nPlease turn on Wifi or 3G");  */

--
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

[jira] [Commented] (CB-1846) Offline event doesn't work

Posted by "Remzi Cavdar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497137#comment-13497137 ] 

Remzi Cavdar commented on CB-1846:
----------------------------------

But this was my reason to not release an unstable PhoneGap to devlopers 
                
> Offline event doesn't work
> --------------------------
>
>                 Key: CB-1846
>                 URL: https://issues.apache.org/jira/browse/CB-1846
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>         Environment: Samsung Galaxy S2 and Google Nexus 7
>            Reporter: Remzi Cavdar
>            Assignee: Joe Bowser
>             Fix For: 2.2.0
>
>
> The offline event doesn't work and I had said this before release, but you guys wanted to release PhoneGap 2.2.0 
> This is my code:
> document.addEventListener("deviceready", onDeviceReady, false);
> function onDeviceReady() {
> 	document.addEventListener("offline", function() {
> 		alert("Er is geen internet verbinding!\nSchakel Wifi of 3G in");
> 	}, false);
> }
> /* English: alert("No internet connection!\nPlease turn on Wifi or 3G");  */

--
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

[jira] [Updated] (CB-1846) Offline event doesn't work

Posted by "Remzi Cavdar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Remzi Cavdar updated CB-1846:
-----------------------------

    Attachment:     (was: Menofood BETA.zip)
    
> Offline event doesn't work
> --------------------------
>
>                 Key: CB-1846
>                 URL: https://issues.apache.org/jira/browse/CB-1846
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>         Environment: Samsung Galaxy S2 and Google Nexus 7
>            Reporter: Remzi Cavdar
>            Assignee: Joe Bowser
>             Fix For: 2.2.0
>
>         Attachments: Menofood-2.zip
>
>
> The offline event doesn't work and I had said this before release, but you guys wanted to release PhoneGap 2.2.0 
> This is my code:
> document.addEventListener("deviceready", onDeviceReady, false);
> function onDeviceReady() {
> 	document.addEventListener("offline", function() {
> 		alert("Er is geen internet verbinding!\nSchakel Wifi of 3G in");
> 	}, false);
> }
> /* English: alert("No internet connection!\nPlease turn on Wifi or 3G");  */

--
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

[jira] [Commented] (CB-1846) Offline event doesn't work

Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497534#comment-13497534 ] 

Joe Bowser commented on CB-1846:
--------------------------------

I can't reproduce this issue either, and I've tested it on my Galaxy Nexus(4.1.2), Nexus S (2.3.6) and Samsung Galaxy SII (4.0.3).
                
> Offline event doesn't work
> --------------------------
>
>                 Key: CB-1846
>                 URL: https://issues.apache.org/jira/browse/CB-1846
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>         Environment: Samsung Galaxy S2 and Google Nexus 7
>            Reporter: Remzi Cavdar
>            Assignee: Joe Bowser
>             Fix For: 2.2.0
>
>
> The offline event doesn't work and I had said this before release, but you guys wanted to release PhoneGap 2.2.0 
> This is my code:
> document.addEventListener("deviceready", onDeviceReady, false);
> function onDeviceReady() {
> 	document.addEventListener("offline", function() {
> 		alert("Er is geen internet verbinding!\nSchakel Wifi of 3G in");
> 	}, false);
> }
> /* English: alert("No internet connection!\nPlease turn on Wifi or 3G");  */

--
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

[jira] [Closed] (CB-1846) Offline event doesn't work

Posted by "Andrew Grieve (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Grieve closed CB-1846.
-----------------------------

    Resolution: Invalid

Looked at your app. The problem is that you're never attaching your offline listener because onLoad is never called from anywhere. I changed:

 <body onload="DisplayDateTime();">

to:

 <body onload="DisplayDateTime();onLoad()">

and it works fine on the first page load. You have a multi-page app here by the looks of it though, so watch out for the bug Simon mentioned where offline events don't work on other page loads. You may want to pull in the fix for that to your app.
                
> Offline event doesn't work
> --------------------------
>
>                 Key: CB-1846
>                 URL: https://issues.apache.org/jira/browse/CB-1846
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>         Environment: Samsung Galaxy S2 and Google Nexus 7
>            Reporter: Remzi Cavdar
>            Assignee: Joe Bowser
>             Fix For: 2.2.0
>
>         Attachments: Menofood BETA.zip
>
>
> The offline event doesn't work and I had said this before release, but you guys wanted to release PhoneGap 2.2.0 
> This is my code:
> document.addEventListener("deviceready", onDeviceReady, false);
> function onDeviceReady() {
> 	document.addEventListener("offline", function() {
> 		alert("Er is geen internet verbinding!\nSchakel Wifi of 3G in");
> 	}, false);
> }
> /* English: alert("No internet connection!\nPlease turn on Wifi or 3G");  */

--
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

[jira] [Resolved] (CB-1846) Offline event doesn't work

Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bowser resolved CB-1846.
----------------------------

    Resolution: Cannot Reproduce

Tested on Nexus 7 as well with Android 4.2. Offline event does work, but it's firing too many events instead of not firing this event.
                
> Offline event doesn't work
> --------------------------
>
>                 Key: CB-1846
>                 URL: https://issues.apache.org/jira/browse/CB-1846
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>         Environment: Samsung Galaxy S2 and Google Nexus 7
>            Reporter: Remzi Cavdar
>            Assignee: Joe Bowser
>             Fix For: 2.2.0
>
>
> The offline event doesn't work and I had said this before release, but you guys wanted to release PhoneGap 2.2.0 
> This is my code:
> document.addEventListener("deviceready", onDeviceReady, false);
> function onDeviceReady() {
> 	document.addEventListener("offline", function() {
> 		alert("Er is geen internet verbinding!\nSchakel Wifi of 3G in");
> 	}, false);
> }
> /* English: alert("No internet connection!\nPlease turn on Wifi or 3G");  */

--
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

[jira] [Updated] (CB-1846) Offline event doesn't work

Posted by "Remzi Cavdar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Remzi Cavdar updated CB-1846:
-----------------------------

    Attachment: Menofood-2.zip

Can someone look at my code?

The app was working fine on 2.1.0, but now only the offline event doesn't work.
                
> Offline event doesn't work
> --------------------------
>
>                 Key: CB-1846
>                 URL: https://issues.apache.org/jira/browse/CB-1846
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>         Environment: Samsung Galaxy S2 and Google Nexus 7
>            Reporter: Remzi Cavdar
>            Assignee: Joe Bowser
>             Fix For: 2.2.0
>
>         Attachments: Menofood-2.zip
>
>
> The offline event doesn't work and I had said this before release, but you guys wanted to release PhoneGap 2.2.0 
> This is my code:
> document.addEventListener("deviceready", onDeviceReady, false);
> function onDeviceReady() {
> 	document.addEventListener("offline", function() {
> 		alert("Er is geen internet verbinding!\nSchakel Wifi of 3G in");
> 	}, false);
> }
> /* English: alert("No internet connection!\nPlease turn on Wifi or 3G");  */

--
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

[jira] [Reopened] (CB-1846) Offline event doesn't work

Posted by "Remzi Cavdar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Remzi Cavdar reopened CB-1846:
------------------------------


Sorry I did exactly what you said, but again it doesn't work.
                
> Offline event doesn't work
> --------------------------
>
>                 Key: CB-1846
>                 URL: https://issues.apache.org/jira/browse/CB-1846
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>         Environment: Samsung Galaxy S2 and Google Nexus 7
>            Reporter: Remzi Cavdar
>            Assignee: Joe Bowser
>             Fix For: 2.2.0
>
>         Attachments: Menofood BETA.zip
>
>
> The offline event doesn't work and I had said this before release, but you guys wanted to release PhoneGap 2.2.0 
> This is my code:
> document.addEventListener("deviceready", onDeviceReady, false);
> function onDeviceReady() {
> 	document.addEventListener("offline", function() {
> 		alert("Er is geen internet verbinding!\nSchakel Wifi of 3G in");
> 	}, false);
> }
> /* English: alert("No internet connection!\nPlease turn on Wifi or 3G");  */

--
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