From callback-dev-return-2200-apmail-incubator-callback-dev-archive=incubator.apache.org@incubator.apache.org Thu Feb 9 23:36:27 2012 Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 919909097 for ; Thu, 9 Feb 2012 23:36:27 +0000 (UTC) Received: (qmail 38300 invoked by uid 500); 9 Feb 2012 23:36:27 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 37922 invoked by uid 500); 9 Feb 2012 23:36:26 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 37897 invoked by uid 99); 9 Feb 2012 23:36:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2012 23:36:26 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2012 23:36:25 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 3F0E91ADB61 for ; Thu, 9 Feb 2012 23:36:05 +0000 (UTC) Date: Thu, 9 Feb 2012 23:36:05 +0000 (UTC) From: "Joe Bowser (Commented) (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <909399261.22064.1328830565259.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1277639015.20927.1322537260163.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CB-77) Connection reported as Connection.NONE MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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