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 )
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.
@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.