Hybrid View

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

      0  

    Default Unanswered: How does Sencha touch handles 'resume' & 'pause' events

    Unanswered: How does Sencha touch handles 'resume' & 'pause' events


    I am using Sencha Touch with Phonegap on Android 4.0.3. The project build is performed with Eclips (not using the native packager).

    One of my application views is a form. When a user fills up some of the form's fields (without submitting), then moves to a different application and comes back to the form view, two things may happen:
    1. The expected behavior - the user returns to the form view, the form remains as it was before.
    2. The application is being initialized again and the first view is shown. Switching to the form view reveals an empty form.

    My questions are:
    1. How does Sencha touch handles native Android Activity Lifecycle events?
    2. In case it doesn't provide any automatic saving to localstorage, are there any Sencha events I can register to? (The equivalent to Phonegap's 'resume' & 'pause' events ).
    3. 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?
    4. Is using Phonegap interrupts in any way to any default Sencha Touch behavior? (meaning that the issue I am experiencing is merely because using Phonegap )

    Regards,
    Roei.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,522
    Answers
    3447
    Vote Rating
    814
    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


    So you say you are using Phonegap so I'm not sure why you are asking of Sencha Touch has any events like Phonegap's resume and pause. Just use those events for Phonegap, that's who is firing the events.
    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
    Join Date
    Sep 2012
    Posts
    104
    Vote Rating
    0
    rbahumi is on a distinguished road

      0  

    Default


    @mitchellsimoens, usually your answers are right to the point. This time, I get the feeling that you haven't really read my question.

    I have described a scenario in which I expect one behavior, and sometimes the application behaves differently. In order to solve/understand this problem, I am trying to find its root cause - doing so requires the understanding of the way Sencha Touch behaves on Android Activity Lifecycle events (especially regarding saving to local storage).

    I am trying to understand if there are such events and if there is a 'default behavior' (core functions that are registered for these events) that I will need to override in order to fix this. Also, I am asking if it is possible that Phonegap interrupts to that default behavior.

    Besides that, saving to the local storage is a functionality that can make the application more robust, and I think that implementing that with Sencha's events will be cleaner.

    Regards,
    Roei.

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,522
    Answers
    3447
    Vote Rating
    814
    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


    Quote Originally Posted by rbahumi View Post
    @mitchellsimoens, usually your answers are right to the point. This time, I get the feeling that you haven't really read my question.
    Or maybe you assumed you were clear.
    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.

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

      0  

    Default


    Ok. Is it clearer now, after my last response? or do I need to provide farther details/explanations?

  6. #6
    Sencha Premium Member
    Join Date
    Aug 2012
    Posts
    83
    Answers
    2
    Vote Rating
    4
    cydaps is on a distinguished road

      0  

    Default


    I've been wondering too if Sencha Touch has any kind of built in pause resume feature... If we're using Ext.device and are packaging up with Sencha app package I'd be interested to know. I'm on Sencha Touch 2.2.1.


    Thanks!!

Thread Participants: 2