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 (Created) (JIRA)" <ji...@apache.org> on 2011/11/29 04:27:40 UTC
[jira] [Created] (CB-77) Connection reported as Connection.NONE
Connection reported as Connection.NONE
--------------------------------------
Key: CB-77
URL: https://issues.apache.org/jira/browse/CB-77
Project: Apache Callback
Issue Type: Bug
Components: Android
Reporter: Simon MacDonald
To be pursuant with Apple guidelines, I recently put checks into my code to detect offline/online status for my apps and alert accordingly. I used this function to detect:
function isOnline() {
// Presume online unless PhoneGap or HTML5 tell us otherwise.
if (navigator.network && navigator.network.connection.type == Connection.NONE) {
return false;
}
if (navigator.onLine && typeof navigator.onLine == 'boolean' && navigator.onLine === false) {
return false;
}
return true;
}
This works as expected for me, but for one of my users (on an Android 2.3), it reports Connection.NONE even when they have perfect reception. So I'm no longer using the network.connection status.
Maybe it doesn't work for some carriers? Or it shouldn't be relied upon for disabling functionality?
@pamelafox that is a weird one. Going back over the code the only time Connection.NONE should be returned is when the the NetworkInfo object is null or it's isConnected() method returns false.
Perhaps there is a window as the application starts up where the network info is not ready. Are you making this check after a deviceready event?
@pamelafox Can you ask your user if they are roaming when the have this problem? If so I think it may be a bug with Android itself.
http://code.google.com/p/android/issues/detail?id=11866
--
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-77) Connection reported as Connection.NONE
Posted by "Joe Bowser (Assigned) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-77?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joe Bowser reassigned CB-77:
----------------------------
Assignee: Joe Bowser
> Connection reported as Connection.NONE
> --------------------------------------
>
> Key: CB-77
> URL: https://issues.apache.org/jira/browse/CB-77
> Project: Apache Callback
> Issue Type: Bug
> Components: Android
> Reporter: Simon MacDonald
> Assignee: Joe Bowser
>
> To be pursuant with Apple guidelines, I recently put checks into my code to detect offline/online status for my apps and alert accordingly. I used this function to detect:
> function isOnline() {
> // Presume online unless PhoneGap or HTML5 tell us otherwise.
> if (navigator.network && navigator.network.connection.type == Connection.NONE) {
> return false;
> }
> if (navigator.onLine && typeof navigator.onLine == 'boolean' && navigator.onLine === false) {
> return false;
> }
> return true;
> }
> This works as expected for me, but for one of my users (on an Android 2.3), it reports Connection.NONE even when they have perfect reception. So I'm no longer using the network.connection status.
> Maybe it doesn't work for some carriers? Or it shouldn't be relied upon for disabling functionality?
> @pamelafox that is a weird one. Going back over the code the only time Connection.NONE should be returned is when the the NetworkInfo object is null or it's isConnected() method returns false.
> Perhaps there is a window as the application starts up where the network info is not ready. Are you making this check after a deviceready event?
> @pamelafox Can you ask your user if they are roaming when the have this problem? If so I think it may be a bug with Android itself.
> http://code.google.com/p/android/issues/detail?id=11866
--
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-77) Connection reported as Connection.NONE
Posted by "Joe Bowser (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-77?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joe Bowser updated CB-77:
-------------------------
Fix Version/s: 2.0.0
> Connection reported as Connection.NONE
> --------------------------------------
>
> Key: CB-77
> URL: https://issues.apache.org/jira/browse/CB-77
> Project: Apache Callback
> Issue Type: Bug
> Components: Android
> Reporter: Simon MacDonald
> Assignee: Joe Bowser
> Fix For: 2.0.0
>
>
> To be pursuant with Apple guidelines, I recently put checks into my code to detect offline/online status for my apps and alert accordingly. I used this function to detect:
> function isOnline() {
> // Presume online unless PhoneGap or HTML5 tell us otherwise.
> if (navigator.network && navigator.network.connection.type == Connection.NONE) {
> return false;
> }
> if (navigator.onLine && typeof navigator.onLine == 'boolean' && navigator.onLine === false) {
> return false;
> }
> return true;
> }
> This works as expected for me, but for one of my users (on an Android 2.3), it reports Connection.NONE even when they have perfect reception. So I'm no longer using the network.connection status.
> Maybe it doesn't work for some carriers? Or it shouldn't be relied upon for disabling functionality?
> @pamelafox that is a weird one. Going back over the code the only time Connection.NONE should be returned is when the the NetworkInfo object is null or it's isConnected() method returns false.
> Perhaps there is a window as the application starts up where the network info is not ready. Are you making this check after a deviceready event?
> @pamelafox Can you ask your user if they are roaming when the have this problem? If so I think it may be a bug with Android itself.
> http://code.google.com/p/android/issues/detail?id=11866
--
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-77) Connection reported as Connection.NONE
Posted by "Chris Smith (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-77?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13272492#comment-13272492 ]
Chris Smith commented on CB-77:
-------------------------------
I'm also experiencing the issue - I'm having customer bring in their device tomorrow to see if I can reproduce at all. Please can you reopen bug?
> Connection reported as Connection.NONE
> --------------------------------------
>
> Key: CB-77
> URL: https://issues.apache.org/jira/browse/CB-77
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Reporter: Simon MacDonald
> Assignee: Joe Bowser
> Fix For: 2.0.0
>
>
> To be pursuant with Apple guidelines, I recently put checks into my code to detect offline/online status for my apps and alert accordingly. I used this function to detect:
> function isOnline() {
> // Presume online unless PhoneGap or HTML5 tell us otherwise.
> if (navigator.network && navigator.network.connection.type == Connection.NONE) {
> return false;
> }
> if (navigator.onLine && typeof navigator.onLine == 'boolean' && navigator.onLine === false) {
> return false;
> }
> return true;
> }
> This works as expected for me, but for one of my users (on an Android 2.3), it reports Connection.NONE even when they have perfect reception. So I'm no longer using the network.connection status.
> Maybe it doesn't work for some carriers? Or it shouldn't be relied upon for disabling functionality?
> @pamelafox that is a weird one. Going back over the code the only time Connection.NONE should be returned is when the the NetworkInfo object is null or it's isConnected() method returns false.
> Perhaps there is a window as the application starts up where the network info is not ready. Are you making this check after a deviceready event?
> @pamelafox Can you ask your user if they are roaming when the have this problem? If so I think it may be a bug with Android itself.
> http://code.google.com/p/android/issues/detail?id=11866
--
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-77) Connection reported as Connection.NONE
Posted by "Joe Bowser (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-77?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joe Bowser resolved CB-77.
--------------------------
Resolution: Cannot Reproduce
No response after a month, going to close since I can't reproduce this issue.
> Connection reported as Connection.NONE
> --------------------------------------
>
> Key: CB-77
> URL: https://issues.apache.org/jira/browse/CB-77
> Project: Apache Callback
> Issue Type: Bug
> Components: Android
> Reporter: Simon MacDonald
> Assignee: Joe Bowser
> Fix For: 2.0.0
>
>
> To be pursuant with Apple guidelines, I recently put checks into my code to detect offline/online status for my apps and alert accordingly. I used this function to detect:
> function isOnline() {
> // Presume online unless PhoneGap or HTML5 tell us otherwise.
> if (navigator.network && navigator.network.connection.type == Connection.NONE) {
> return false;
> }
> if (navigator.onLine && typeof navigator.onLine == 'boolean' && navigator.onLine === false) {
> return false;
> }
> return true;
> }
> This works as expected for me, but for one of my users (on an Android 2.3), it reports Connection.NONE even when they have perfect reception. So I'm no longer using the network.connection status.
> Maybe it doesn't work for some carriers? Or it shouldn't be relied upon for disabling functionality?
> @pamelafox that is a weird one. Going back over the code the only time Connection.NONE should be returned is when the the NetworkInfo object is null or it's isConnected() method returns false.
> Perhaps there is a window as the application starts up where the network info is not ready. Are you making this check after a deviceready event?
> @pamelafox Can you ask your user if they are roaming when the have this problem? If so I think it may be a bug with Android itself.
> http://code.google.com/p/android/issues/detail?id=11866
--
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-77) Connection reported as Connection.NONE
Posted by "Joe Bowser (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-77?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205045#comment-13205045 ]
Joe Bowser commented on CB-77:
------------------------------
Acutally, no it's not. I just threw an AT&T SIM into a device and it's reporting the connectivity correctly on the Nexus S we're using here. (It's roaming on Rogers)
@pamelafox: Can you get information about the device and the carrier?
> Connection reported as Connection.NONE
> --------------------------------------
>
> Key: CB-77
> URL: https://issues.apache.org/jira/browse/CB-77
> Project: Apache Callback
> Issue Type: Bug
> Components: Android
> Reporter: Simon MacDonald
> Assignee: Joe Bowser
> Fix For: 2.0.0
>
>
> To be pursuant with Apple guidelines, I recently put checks into my code to detect offline/online status for my apps and alert accordingly. I used this function to detect:
> function isOnline() {
> // Presume online unless PhoneGap or HTML5 tell us otherwise.
> if (navigator.network && navigator.network.connection.type == Connection.NONE) {
> return false;
> }
> if (navigator.onLine && typeof navigator.onLine == 'boolean' && navigator.onLine === false) {
> return false;
> }
> return true;
> }
> This works as expected for me, but for one of my users (on an Android 2.3), it reports Connection.NONE even when they have perfect reception. So I'm no longer using the network.connection status.
> Maybe it doesn't work for some carriers? Or it shouldn't be relied upon for disabling functionality?
> @pamelafox that is a weird one. Going back over the code the only time Connection.NONE should be returned is when the the NetworkInfo object is null or it's isConnected() method returns false.
> Perhaps there is a window as the application starts up where the network info is not ready. Are you making this check after a deviceready event?
> @pamelafox Can you ask your user if they are roaming when the have this problem? If so I think it may be a bug with Android itself.
> http://code.google.com/p/android/issues/detail?id=11866
--
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-77) Connection reported as Connection.NONE
Posted by "Joe Bowser (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-77?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13198123#comment-13198123 ]
Joe Bowser commented on CB-77:
------------------------------
This relates to some of the AOSP hackery that I'm currently working on.
> Connection reported as Connection.NONE
> --------------------------------------
>
> Key: CB-77
> URL: https://issues.apache.org/jira/browse/CB-77
> Project: Apache Callback
> Issue Type: Bug
> Components: Android
> Reporter: Simon MacDonald
> Assignee: Joe Bowser
> Fix For: 2.0.0
>
>
> To be pursuant with Apple guidelines, I recently put checks into my code to detect offline/online status for my apps and alert accordingly. I used this function to detect:
> function isOnline() {
> // Presume online unless PhoneGap or HTML5 tell us otherwise.
> if (navigator.network && navigator.network.connection.type == Connection.NONE) {
> return false;
> }
> if (navigator.onLine && typeof navigator.onLine == 'boolean' && navigator.onLine === false) {
> return false;
> }
> return true;
> }
> This works as expected for me, but for one of my users (on an Android 2.3), it reports Connection.NONE even when they have perfect reception. So I'm no longer using the network.connection status.
> Maybe it doesn't work for some carriers? Or it shouldn't be relied upon for disabling functionality?
> @pamelafox that is a weird one. Going back over the code the only time Connection.NONE should be returned is when the the NetworkInfo object is null or it's isConnected() method returns false.
> Perhaps there is a window as the application starts up where the network info is not ready. Are you making this check after a deviceready event?
> @pamelafox Can you ask your user if they are roaming when the have this problem? If so I think it may be a bug with Android itself.
> http://code.google.com/p/android/issues/detail?id=11866
--
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-77) Connection reported as Connection.NONE
Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-77?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13272498#comment-13272498 ]
Joe Bowser commented on CB-77:
------------------------------
Please open a new bug and provide details on the device. It's entirely possible that your device doesn't detect connectivity properly.
> Connection reported as Connection.NONE
> --------------------------------------
>
> Key: CB-77
> URL: https://issues.apache.org/jira/browse/CB-77
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Reporter: Simon MacDonald
> Assignee: Joe Bowser
> Fix For: 2.0.0
>
>
> To be pursuant with Apple guidelines, I recently put checks into my code to detect offline/online status for my apps and alert accordingly. I used this function to detect:
> function isOnline() {
> // Presume online unless PhoneGap or HTML5 tell us otherwise.
> if (navigator.network && navigator.network.connection.type == Connection.NONE) {
> return false;
> }
> if (navigator.onLine && typeof navigator.onLine == 'boolean' && navigator.onLine === false) {
> return false;
> }
> return true;
> }
> This works as expected for me, but for one of my users (on an Android 2.3), it reports Connection.NONE even when they have perfect reception. So I'm no longer using the network.connection status.
> Maybe it doesn't work for some carriers? Or it shouldn't be relied upon for disabling functionality?
> @pamelafox that is a weird one. Going back over the code the only time Connection.NONE should be returned is when the the NetworkInfo object is null or it's isConnected() method returns false.
> Perhaps there is a window as the application starts up where the network info is not ready. Are you making this check after a deviceready event?
> @pamelafox Can you ask your user if they are roaming when the have this problem? If so I think it may be a bug with Android itself.
> http://code.google.com/p/android/issues/detail?id=11866
--
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