You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Jolien Coenraets (Created) (JIRA)" <ji...@apache.org> on 2012/02/21 10:08:39 UTC

[jira] [Created] (CB-271) Network status reports unknown

Network status reports unknown
------------------------------

                 Key: CB-271
                 URL: https://issues.apache.org/jira/browse/CB-271
             Project: Apache Callback
          Issue Type: Bug
          Components: Android
    Affects Versions: 1.4.0
            Reporter: Jolien Coenraets
            Assignee: Joe Bowser


navigator.network.connection.type returns 'unknown' when the device is just started. When you change the network type (for example when you turn Wifi on and off) the type is correct. But if a user never does this it keeps returning 'unknown'. 

We use this to detect if data can be sent or not, and when it returns 'unknown' it's possible that there is a connection, but it's possible that there isn't one too. We can't know which one it is.

This happens with PhoneGap 1.4.1 on Android 2.2.2 and 2.3.3, on iOS it seems to be correct.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CB-271) Network status reports unknown

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

Joe Bowser resolved CB-271.
---------------------------

    Resolution: Fixed

This was fixed in 1.5
                
> Network status reports unknown
> ------------------------------
>
>                 Key: CB-271
>                 URL: https://issues.apache.org/jira/browse/CB-271
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.4.0
>            Reporter: Jolien Coenraets
>            Assignee: Simon MacDonald
>             Fix For: 1.5.0
>
>
> navigator.network.connection.type returns 'unknown' when the device is just started. When you change the network type (for example when you turn Wifi on and off) the type is correct. But if a user never does this it keeps returning 'unknown'. 
> We use this to detect if data can be sent or not, and when it returns 'unknown' it's possible that there is a connection, but it's possible that there isn't one too. We can't know which one it is.
> This happens with PhoneGap 1.4.1 on Android 2.2.2 and 2.3.3, on iOS it seems to be correct.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-271) Network status reports unknown

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

Jolien Coenraets commented on CB-271:
-------------------------------------

Hi,

We don't request the Wifi state permission. Can this be the problem? We thought that network state was enough. I will give it a try to see if this fixes this bug, but it I think it will not be before Monday.

Thanks for your reply
                
> Network status reports unknown
> ------------------------------
>
>                 Key: CB-271
>                 URL: https://issues.apache.org/jira/browse/CB-271
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.4.0
>            Reporter: Jolien Coenraets
>            Assignee: Joe Bowser
>
> navigator.network.connection.type returns 'unknown' when the device is just started. When you change the network type (for example when you turn Wifi on and off) the type is correct. But if a user never does this it keeps returning 'unknown'. 
> We use this to detect if data can be sent or not, and when it returns 'unknown' it's possible that there is a connection, but it's possible that there isn't one too. We can't know which one it is.
> This happens with PhoneGap 1.4.1 on Android 2.2.2 and 2.3.3, on iOS it seems to be correct.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-271) Network status reports unknown

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

Joe Bowser updated CB-271:
--------------------------

    Fix Version/s: 1.5.0
    
> Network status reports unknown
> ------------------------------
>
>                 Key: CB-271
>                 URL: https://issues.apache.org/jira/browse/CB-271
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.4.0
>            Reporter: Jolien Coenraets
>            Assignee: Simon MacDonald
>             Fix For: 1.5.0
>
>
> navigator.network.connection.type returns 'unknown' when the device is just started. When you change the network type (for example when you turn Wifi on and off) the type is correct. But if a user never does this it keeps returning 'unknown'. 
> We use this to detect if data can be sent or not, and when it returns 'unknown' it's possible that there is a connection, but it's possible that there isn't one too. We can't know which one it is.
> This happens with PhoneGap 1.4.1 on Android 2.2.2 and 2.3.3, on iOS it seems to be correct.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CB-271) Network status reports unknown

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

Joe Bowser reassigned CB-271:
-----------------------------

    Assignee: Simon MacDonald  (was: Joe Bowser)

This is related to the cordova-js work that you are currently doing. 
                
> Network status reports unknown
> ------------------------------
>
>                 Key: CB-271
>                 URL: https://issues.apache.org/jira/browse/CB-271
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.4.0
>            Reporter: Jolien Coenraets
>            Assignee: Simon MacDonald
>
> navigator.network.connection.type returns 'unknown' when the device is just started. When you change the network type (for example when you turn Wifi on and off) the type is correct. But if a user never does this it keeps returning 'unknown'. 
> We use this to detect if data can be sent or not, and when it returns 'unknown' it's possible that there is a connection, but it's possible that there isn't one too. We can't know which one it is.
> This happens with PhoneGap 1.4.1 on Android 2.2.2 and 2.3.3, on iOS it seems to be correct.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-271) Network status reports unknown

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

Simon MacDonald commented on CB-271:
------------------------------------

Can you confirm that you have the following permissions in your AndroidManifest.xml?

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

                
> Network status reports unknown
> ------------------------------
>
>                 Key: CB-271
>                 URL: https://issues.apache.org/jira/browse/CB-271
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.4.0
>            Reporter: Jolien Coenraets
>            Assignee: Joe Bowser
>
> navigator.network.connection.type returns 'unknown' when the device is just started. When you change the network type (for example when you turn Wifi on and off) the type is correct. But if a user never does this it keeps returning 'unknown'. 
> We use this to detect if data can be sent or not, and when it returns 'unknown' it's possible that there is a connection, but it's possible that there isn't one too. We can't know which one it is.
> This happens with PhoneGap 1.4.1 on Android 2.2.2 and 2.3.3, on iOS it seems to be correct.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-271) Network status reports unknown

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

Jolien Coenraets commented on CB-271:
-------------------------------------

Hi,

I added the Wifi state permission but that doesn't change the problem. You can simulate the problem by restarting your phone and then ask the connection type (without changing it after the start up of your phone).
                
> Network status reports unknown
> ------------------------------
>
>                 Key: CB-271
>                 URL: https://issues.apache.org/jira/browse/CB-271
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.4.0
>            Reporter: Jolien Coenraets
>            Assignee: Joe Bowser
>
> navigator.network.connection.type returns 'unknown' when the device is just started. When you change the network type (for example when you turn Wifi on and off) the type is correct. But if a user never does this it keeps returning 'unknown'. 
> We use this to detect if data can be sent or not, and when it returns 'unknown' it's possible that there is a connection, but it's possible that there isn't one too. We can't know which one it is.
> This happens with PhoneGap 1.4.1 on Android 2.2.2 and 2.3.3, on iOS it seems to be correct.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira