Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Jul 2011
    Location
    Utrecht
    Posts
    84
    Vote Rating
    3
    DJFliX is on a distinguished road

      0  

    Default Will Sencha Native Build provide onPause and onResume events?

    Will Sencha Native Build provide onPause and onResume events?


    Hi! I have been using ST1 + Phonegap in the past, but at the moment I am trying to get the most out of Sencha Touch 2 + Native Building. Because of the nature of the app that I am writing it is mandatory that the app 'logs the user off' when it has been in the background for more than 5 minutes. In the past I just assigned the current date to a variable onPause and compared it to the timestamp in onResume. If the difference was more than 5 minutes => lock.

    I know that Sencha uses the onPause and onResume internally for solving the iOS LocalStorage bug, but I would like to know whether I can access these events from the JS-part of Sencha. Can a source-code-fanatic or developer shed some light on this?

    Thanks in advance!

  2. #2
    Sencha User
    Join Date
    Jun 2011
    Posts
    46
    Vote Rating
    1
    gubarez is on a distinguished road

      0  

    Default


    just use these listeners:

    Code:
    document.addEventListener("pause", yourCallbackFunction,false);
    
    document.addEventListener("resume", yourCallbackFunction, false);
    This wont halt your app in any way (even when you use it in browser)

  3. #3
    Sencha User
    Join Date
    Jul 2011
    Location
    Utrecht
    Posts
    84
    Vote Rating
    3
    DJFliX is on a distinguished road

      0  

    Default


    Quote Originally Posted by gubarez View Post
    just use these listeners:

    Code:
    document.addEventListener("pause", yourCallbackFunction,false);
    
    document.addEventListener("resume", yourCallbackFunction, false);
    This wont halt your app in any way (even when you use it in browser)
    You, kind sir, did not answer my question. I wanted to avoid using PhoneGap for this. But thanks for your response. If possible I would like to build for Android and iOS with the least amount of extra steps possible. At the moment I only have to run one script to build all of this and it doesn't involve phonegap projects (that tended to break in SVN). For this reason I would like to use the Sencha Native Build stuff only.

  4. #4
    Sencha User
    Join Date
    Jun 2011
    Posts
    46
    Vote Rating
    1
    gubarez is on a distinguished road

      0  

    Default


    You can freely add these listeners in your sencha app.... These are only listeners and the document.addEventListener method is a "native JavaScript one"... Just the strings are "custom", but this is no problem. Just put them in your sencha touch app, no bother if its in phonegap or somewhere else... Only on phonegap you'll have this listener generated though. (or if you generate custom events to simulate that)

  5. #5
    Sencha User
    Join Date
    Jul 2011
    Location
    Utrecht
    Posts
    84
    Vote Rating
    3
    DJFliX is on a distinguished road

      0  

    Default


    Quote Originally Posted by gubarez View Post
    You can freely add these listeners in your sencha app.... These are only listeners and the document.addEventListener method is a "native JavaScript one"... Just the strings are "custom", but this is no problem. Just put them in your sencha touch app, no bother if its in phonegap or somewhere else... Only on phonegap you'll have this listener generated though. (or if you generate custom events to simulate that)
    And the latter would be what I am interested in. I'd like to hook up to the events within Sencha to 'catch' these events, if possible. But I'm afraid this all happens in the OS Native part of the Sencha application, and not at all exposed to the sencha touch javascript.

  6. #6
    Sencha Premium Member
    Join Date
    May 2012
    Posts
    25
    Vote Rating
    0
    mediademon is on a distinguished road

      0  

    Default


    I would also like to access the onPause and onResume event, to reload a store that might have changed while the app is paused.

    Did you figure out a way to do it?

  7. #7
    Sencha User
    Join Date
    Sep 2012
    Posts
    104
    Vote Rating
    0
    rbahumi is on a distinguished road

      0  

    Default


    Any update on this from the Sencha team?

    Can someone please put a reference to any documentation/article (hopefully there is such documentation) that describes the way Sencha behaves on 'pause' & 'resume' events?