Problem Description
Closing a titanium app on Android 4.4.3 will lead to the previous app from the task switcher showing up for a short time.
Steps to reproduce
1. Create new app (classic titanium)
2. Using Mobile SDK 3.3.0.RC
3. Use the default project (two tabs)
4. Install it on a device with 4.4.3
5. Do this:
* home screen
* opening camera app
* closing camera app
* home screen
* opening titanium app
* closing titanium app
* camera app shows up shortly
* home screen
Extra information
QA Link:
http://developer.appcelerator.com/question/175386/android-443-closing-ti-app-will-show-previous-app
Hello Michael, does this happen with the default app? We need instructions to reproduce this, I don't have a device to try this, so we need you to follow this instructions: 1. Open Ti Studio 2. Create a new mobile project (classic) 3. Select the classic two tabs. 4. Run this into your device. Does this reproduce the issue? Best, Mauro
Hello Mauro, I have tested this too on different devices and can confirm the behaviour. I've build the the test app with SDK 3.2.3.GA and installed on my Nexus 5 with Android 4.4.3 and other devices with older Versions - everything was fine. Then I've build the app with 3.3.0.Beta and 3.3.0.RC and the described behaviour appeared on Android 4.4.3 but not on 4.4.2 or 4.3 - Same for every other Titanium App I've tested.
I even have problems with my own apps I've installed from the store (build before 4.4.3) or had on the device before I did the update! Only Titanium apps showed this behaviour in 4.4.3 and still do in 4.4.4 (update arrived yesterday) Default app does the same when closing it (3.2.3 GA, 3.3.0 RC) Log:
I'm at Ticonf Amsterdam and got my device with me if you need to do some testing
Verified the issue is reproducible. This issue is seen even if the first app opened is a titanium app & not just camera or default android apps.
Below are my findings:
1. Open any app, even titanium app.(this is first app) 2. Press home button. (app is backgrounded) 3. Open a titanium app.(this is second app) 4. Close it by tapping the back button. 5. You will see the previous app for 1 sec.Special case when chrome browser is the first app:
6. Open Chrome browser on nexus 5.(This is the first app) 7. Close it using the back button. (this step is the difference as compared to above) 8. Open a titanium app.(this is second app) 9. Close it by tapping the back button. 10. You will see the chrome browser for 1 sec. Environment: Appc Studio : 3.3.0.201406231625 Ti SDK : 3.3.0.v20140624130120 Mac OSX : 10.8.5 Alloy : 1.4.0-rc2 CLI - 3.3.0-rc2 Code Processor: 1.1.1 Nexus 5 - android 4.4.4I think this may be a native problem. See comment on: http://androidspin.com/2014/06/15/discussion-problems-android-4-4-3-deep-rabbit-hold-go/ "gogoboy • 8 days ago Since updated to 4.4.3, power juice seems shorter. Same usage, but my Nexus4 keeps screaming time to recharge. I recall that 4.4.2 would last me till the end plus avg 20+% remain. Another problem makes my eyes sore is, when close one app, the previous app will show about a couple seconds." 4.4.4 is supposed to fix 4.4.3 issues: http://www.neowin.net/news/google-rolls-out-android-444-after-buggy-bug-fixing-443-release
Can we take a quick look and see if anything looks suspicious here from the Titanium perspective?
@Ingo Muschenetz: the problem still occurs in 4.4.4 on my Nexus 4. Perhaps the app gogoboy is talking about is a Titanium app.
That's possible. [~lchoudhary] Are you able to reproduce it if neither application is a Titanium application?
[~ingo]- I don't see the issue if neither of the applications are titanium applications. FYI, I am using 4.4.4 Nexus 5 device for testing.
Technically speaking, this is not a regression. This issue happens when the exitOnClose property of the first/root window is set to true. Since in 3.3, exitOnClose is set to true by default (see [this commit](https://github.com/appcelerator/titanium_mobile/commit/b82829e6f1471490a2866538cabffd13df80a3dc)), this issue shows even exitOnClose is not explicitly specified. A simple test case:
I've seen this issue occur on other Apps too (e.g. Dropbox) which are not build with Titanium. Problem still occurs on Android L btw.
Tried to reproduce this with non titanium apps on Nexus 5 - android 4.4.4 Tried with dropbox app as mentioned in the comment above, but could not reproduce the issue with non titanium apps.
Here is a simple workaround until this is fixed:
This is an Android issue on 4.4.3 and above, which has been filed [Issue 71067](https://code.google.com/p/android/issues/detail?id=71067). Seems Google has fixed it. Hopefully the fix will be in the next 4.4.x patch.
Closing ticket as the issue is not our bug.