Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User VladimirTechMan's Avatar
    Join Date
    Jun 2012
    Location
    Russia
    Posts
    50
    Vote Rating
    4
    VladimirTechMan is on a distinguished road

      1  

    Default Ext.device.Connection: online status & connection type not updated on iOS app resume

    Ext.device.Connection: online status & connection type not updated on iOS app resume


    Ext version tested:
    • Sencha Touch 2.1.0 RC2
    • Sencha Cmd 3.0.0.230
    Description:
    • Sencha Touch 2 apps (native-packaged for iOS) that are using Ext.device.Connection will get wrong online status and connection type when the application is paused, then the connection status/type changes, and then the application is resumed.
    Steps to reproduce the problem:
    • Create a Sencha Touch 2 app that internally uses Ext.device.Connection.isOnline() and/or Ext.device.Connection.getType() and in such a way that a user action can trigger calling them (e.g. on tapping a button)
    • Package the application as native iOS application
    • Install the application on iOS device
    • Start the application on iOS and note the connection status and type returned
    • Pause the application
    • Go to Settings of iOS and change the actual connection status or type (e.g. if there was a connection to Internet, then go to the airplane mode, or switch off Wi-Fi, or alike)
    • Resume the application and make it calling Ext.device.Connection.isOnline() and/or Ext.device.Connection.getType() once again (with the appropriate user action)
    • Note the connection status and type returned this time
    The result that was expected:
    • The returned connection status and type are in sync with the actual connection status and type on the device
    The result that occurs instead:
    • The returned connection status and type remain exactly the same as they are when the application is started first
    Test Case:
    • Create a new Sencha Touch application with 'sencha generate app'
    • Replace the original Main.js file with the file attached to this report
    • Package as native iOS app and install on iOS device
    • Start the iOS app on the device, note the connect status and type
    • Pause the application, change the connection status/type, and then resume the application
    • Press the "Refresh Info" button to update the connection status and type. See the connection status and type returned.
    Attached Files

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,801
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    First thing I see is you are breaking inheritance by not calling the parent in initialize. You need to add a this.callParent();
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User VladimirTechMan's Avatar
    Join Date
    Jun 2012
    Location
    Russia
    Posts
    50
    Vote Rating
    4
    VladimirTechMan is on a distinguished road

      0  

    Default


    I updated the attached file. Well-spotted, Mitchell. Thanks. Mea culpa.

  4. #4
    Sencha User VladimirTechMan's Avatar
    Join Date
    Jun 2012
    Location
    Russia
    Posts
    50
    Vote Rating
    4
    VladimirTechMan is on a distinguished road

      0  

    Default


    Hi Mitchell,

    Any chance you can get back to this one, please?

  5. #5
    Sencha User VladimirTechMan's Avatar
    Join Date
    Jun 2012
    Location
    Russia
    Posts
    50
    Vote Rating
    4
    VladimirTechMan is on a distinguished road

      0  

    Default


    Mitchel, please, review

  6. #6
    Sencha User
    Join Date
    Dec 2010
    Posts
    2
    Vote Rating
    0
    ayuzhin is on a distinguished road

      0  

    Default


    Subscribe to the issue, when it will be fixed?


    Sencha Touch 2.2.0
    Sencha Cmd v3.1.2.342

    Still does not work

  7. #7
    Sencha User
    Join Date
    Apr 2011
    Location
    Lahore, Pakistan
    Posts
    5
    Vote Rating
    0
    appsgenii is on a distinguished road

      0  

    Default Any solution or work around found?

    Any solution or work around found?


    Ext.device.Connection does not work on native IOS after ST 2.0.1

  8. #8
    Sencha User VladimirTechMan's Avatar
    Join Date
    Jun 2012
    Location
    Russia
    Posts
    50
    Vote Rating
    4
    VladimirTechMan is on a distinguished road

      0  

    Default


    Just a quick note to all those still suffering from that unpleasant issue (to be fixed some day, I hope):
    • If you do need to know the exact type of current connection. Then... well, I am sorry, but that has to be fixed by Sencha developers. I cannot think of any good workarounds here, on the JavaScript side.

      But...
    • If you only need to check from your app (packaged and running as native) if it is on-line or not. Then you have a simple and easy alternative:

      Check navigator.onLine. This one is from the JavaScript API in WebView, not a part of bridging to native mobile OS APIs.
    ---
    Vladimir (TechMan)

  9. #9
    Sencha User
    Join Date
    May 2013
    Posts
    37
    Vote Rating
    1
    kidmanmatch is on a distinguished road

      0  

    Default Thanks

    Thanks


    Thank you so much for your thread, its really helped me to get connection status, I tried with Ext.device.connection so may times but no success in my IPod, navigator.onLine worked for me both in IOS and Android

  10. #10
    Sencha User VladimirTechMan's Avatar
    Join Date
    Jun 2012
    Location
    Russia
    Posts
    50
    Vote Rating
    4
    VladimirTechMan is on a distinguished road

      0  

    Default


    You're welcome!
    ---
    Vladimir (TechMan)

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi