Pause and Resume not firing on Android
I am trying to catch both the 'pause' and the 'resume' events. These events seem to work as expected on iOS, but they are not getting caught on Android. Has anyone been able to get this to work for them. I am testing on Android 1.6 through the emulator and using Titanium SDK 1.4.2. Here is the code I am using to listen for the events.
Ti.App.addEventListener('pause',
function(e) {
Ti.API.info('Caught pause event');
});
Ti.App.addEventListener('resume',
function(e) {
Ti.API.info('Caught resume event');
});
2 Answers
-
Those events are iPhone only. Android does not have the concept of applications pausing and resuming only Activities. In the upcoming 1.5.0 release you can capture the native activity events for Android.
-
Try the answer in this thread. Application (Activity) resume event on Android. I'm testing it on an app I'm building.