Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3121] Does Not Fire Resume Event When Returning from iOS Multitasking Bar

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionFixed
Resolution Date2011-11-01T12:48:17.000+0000
Affected Version/sn/a
Fix Version/sSprint 2011-28, Release 1.8.0
ComponentsiOS
Labelsn/a
ReporterJon Alter
AssigneeBlain Hamon
Created2011-04-15T03:37:27.000+0000
Updated2012-02-10T00:52:22.000+0000

Description

In iOS when a user double taps the home button to bring up the multitasking bar, Titanium fires a pause event. If the user double taps the home button again to dismiss the multitasking bar, Titanium does NOT fire a resume event.

Found the same results when testing SDK versions 1.5.1, 1.6.0.RC1, 1.7.0 w/ iOS SDK version 4.2

Associated Helpdesk Ticket

http://developer.appcelerator.com/helpdesk/view/72951">http://developer.appcelerator.com/helpdesk/view/72951

Comments

  1. Gerry Cardinal III 2011-04-15

    Similarly, when a notification (e.g. text message) is received, a pause event is fired, but no corresponding resume event is fired if the user dismisses the notification (and stays in the app).

  2. Gerry Cardinal III 2011-04-15

    Also, when the device is locked and unlocked, there is a pause event, but no resume event.

    I now see that "resumed" (with a D) events are being fired when returning from the multitasking bar. I haven't tested it yet, but I assume this is the case for dismissing notifications and unlocking as well. Maybe the "resume" event is an additional event only for when the app is relaunched from the background?

    So, maybe this is working correctly? Hopefully the documentation will make the distinction between resume & resumed clear?

  3. Blain Hamon 2011-07-12

    Here's the breakdown of iOS native app delegate calls to Ti.App events: -(void)applicationWillEnterForeground:(UIApplication *)application fires a 'resume' event - (void)applicationDidBecomeActive:(UIApplication *)application fires a 'resumed' event -(void)applicationWillResignActive:(UIApplication *)application fires a 'pause' event Cross-referencing with http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIApplicationDelegate_Protocol/Reference/Reference.html gives us: Resume: In iOS 4.0 and later, this method is called as part of the transition from the background to the inactive state. You can use this method to undo many of the changes you made to your application upon entering the background. The call to this method is invariably followed by a call to the applicationDidBecomeActive: method, which then moves the application from the inactive to the active state. Resumed: This method is called to let your application know that it moved from the inactive to active state. This can occur because your application was launched by the user or the system. Applications can also return to the active state if the user chooses to ignore an interruption (such as an incoming phone call or SMS message) that sent the application temporarily to the inactive state. Pause: This method is called to let your application know that it is about to move from the active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. An application in the inactive state continues to run but does not dispatch incoming events to responders. Should this be a documentation or parity issue instead?
  4. Blain Hamon 2011-07-13

    Quick update: Android represents the lifecycle in a different fashion, so this is all iOS. So let's call this a documentation issue and note that the behavior is te expected one.
  5. Stephen Tramer 2011-07-25

    Validated & accepted pull.
  6. Vikramjeet Singh 2011-08-29

    Tested On: Mac OSX Lion TiMob: 1.8.0.v20110819142548 TiStud: 1.0.4.201108101535 Devices: iPhone 4 version 4.2.10 iPad2 version 4.3.5 iPod 3
  7. Reggie Seagraves 2011-11-01

    Missed reclosing this issue during scrub.

JSON Source