GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2014-03-26T22:58:52.000+0000 |
Affected Version/s | Release 3.2.0 |
Fix Version/s | 2014 Sprint 06, 2014 Sprint 06 SDK, Release 3.3.0 |
Components | Android |
Labels | module_android, parity, qe-closed-3.3.0, qe-testadded, regression |
Reporter | Dustin Hyde |
Assignee | Ingo Muschenetz |
Created | 2014-01-27T21:18:29.000+0000 |
Updated | 2014-07-22T10:27:50.000+0000 |
Android: app requires two back events to close main window.
Regression.
Works in:
Alloy 1.2.2
Titanium SDK 3.1.3.GA
Appcelerator Studio 3.1.3 Stable
Samsung Galaxy S3 Mini 4.1.2
OS X 10.9.1
Test Steps:
1. Package default alloy android app.
2. Run app.
3. Press device 'back'.
Result:
Background image appears, app does not close. Workaround is to press 'back' twice.
Expected Result:
App closes.
I can confirm that this is an issue. However, I see the same behavior with a TiClassic app. So, this isn't an Alloy problem. Testing methodology: I created two apps, one Alloy and one Classic. I compiled both using Alloy 1.3.0 / Ti3.2.0.GA. Both exhibit the behavior described (first tap of Back returns to splash screen, second exits app). I then compiled both using Alloy 1.2.2 / Ti3.1.2.GA. Both exit correctly on the first tap of the Back button.
This is expected behavior. Starting with 3.2.0.GA, all windows are backed by an activity. So if you open a window, you have an activity on top of the root activity. Hitting the 'back' button closes an activity, therefore you would need to click it twice to close the app.
But this really breaks user expectations. On the main screen of an app, users expect hitting Back will exit the app and return them to the home screen. I know that developers can add exitOnClose=true to their window definition to support this. However, this was never required before and will force developers to update all their apps. The platform should handle the special case of the first/primary window in the app.
[~vduggal] to create tickets on fragments which is the proper solution to this. In the meantime, we need to advertise the workaround for this by using exitOnClose=true more aggressively.
Packaged the default alloy app, using CLI command
Had to press device "back" only once to close main window. Appcelerator Studio, build: 3.3.0.201404221437 Titanium SDK, build 3.3.0.v20140422163054 Node.JS Version: v0.10.13 NPM Version: 1.3.2 ├── acs@1.0.14 ├── alloy@1.4.0-dev ├── node-appc@0.2.0 ├── npm@1.3.2 ├── titanium@3.3.0-dev └── titanium-code-processor@1.1.1-beta1 npm -g ls titanium: /usr/local/lib └── titanium@3.3.0-dev (git://github.com/appcelerator/titanium.git#93414d143051df4578b7aa42670008e5ef02c422) Device: Nexus 4 Android version 4.2