how to get iPhone 5 to dial out

5 posts, 0 answers
  1. Roger
    Roger avatar
    183 posts
    Member since:
    Sep 2007

    Posted 20 Oct 2013 Link to this post

    Hi,
    am using phonegap to check if a connection is available:
    if(navigator.connection.type !== Connection.NONE){...do the work
    }
    this works fine on android but when the WIFI is turned off on iPhone it keeps saying connection none...how can I get iPhone to dial out and make a data connection if the wifi is off?
  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 21 Oct 2013 Link to this post

    Hello Roger,

    We could not reproduce such behavior using the connection sample on iOS 7 device targeting Cordova 3.0 and we do not see reports of such a problem in Cordova in general. Please try the sample and let us know whether you observe different behavior.

    Regards,
    Steve
    Telerik
    You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  3. Roger
    Roger avatar
    183 posts
    Member since:
    Sep 2007

    Posted 21 Oct 2013 Link to this post

    Hi Steve,
    your connection sample has nothing to do with the problem I am having.....it does not use the phone's data connection  to connect to the internet so no wonder it works. All the connection samples tell the state of the connection, in the case of iOS  "iOS cannot detect the type of cellular network connection"

    I have solved the problem by adding the offline/online events listeners (as per the PhoneGap API) to set a global variable that I can check.
     
  4. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 22 Oct 2013 Link to this post

    Hello Roger,

    Glad you found a way that works for you. The connection sample checks the connection of the device and when initially on wifi, it shows wifi, when you turn wifi off without leaving your app (by using the swipe up menu) it correctly detects cellular and not none as you've described. iOS has a quirk documented in Cordova's connection API which is iOS cannot detect the type of cellular network connection, but still it returns cellular and not none.

    Regards,
    Steve
    Telerik
    You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  5. Roger
    Roger avatar
    183 posts
    Member since:
    Sep 2007

    Posted 22 Oct 2013 Link to this post

    Hi Steve,
     thanks for replying but there is 1 thing that stands out.

    My JavaScript code is the same

    The difference is the phone gap framework...in Android the JavaScript works as expected in a built app. In iPhone5 (iOS6) the built app does not behave as expected.....this is with the same JavaScript code.

    If there was a problem with my code there would be a problem with both phones....and there isn't...so it looks like a framework interpretation issue.
Back to Top