Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8342] Android: keyDispatchingTimedOut when trying to resume an app from background to foreground

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2012-04-02T10:07:39.000+0000
Affected Version/sRelease 2.0.0, Release 1.8.2
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterJunaid Younus
AssigneeAllen Yeung
Created2012-03-27T20:47:28.000+0000
Updated2017-03-09T23:24:18.000+0000

Description

*Code* I personally would say majority of Titanium Android apps, but for this ticket, please try it with the KitchenSink app. *Expected behavior* When you put an app into the background, and bring it back into the foreground, it should work perfectly fine. *Actual behavior* The app seems to show a black background for 1-2 seconds and then restarts. *Steps to reproduce* I can reproduce this issue 3 out of 5 times, by doing the following: *1.* If you have the KitchenSink app open in memory from before, kill it. We want to make sure we start from a clean slate. *2.* Make sure you have your USB cable connected to your laptop and phone. *3.* Run the KitchenSink app, wait for it to load and press the home button (don't press the back button, but instead the home button!) *4.* Run a few other apps in the background, I ran 'Gmail', 'Contacts', 'Internet', 'Peep', 'Places', 'Stocks' and 'Market'. It's important that you press the home button and NOT the back button! (NOTE if it doesn't work for you the first time, try opening more or even less apps, it might make a difference, depending on the device's specs). *5.* Once you have some apps running in the background, make sure you are back on the main home screen. *6.* Press the power button (lock your screen, turn the screen off, but don't power the device off!) *7.* Unplug the USB cable. *8.* Unlock your phone. *9.* Press on the KitchenSink app icon. *10.* Expect to see a black background for a second or two and then it will restart the app. *11.* If you don't, repeat from step 1. *Notes* -Different apps behave differently. The KitchenSink app, for example, seems to show a black background for 1-2 seconds and then restart the whole app. Other apps, such as Mister (from Google Play), actually shows a black screen and never continues to do anything else. The Jiffy Lube app, restarts and has the loading screen image visible as the background border. -KitchenSink was packaged with a 2.0 CI build. -Mister on Google Play is packaged with a 1.9.0.v20120209110134 build. -Jiffy Lube on Google Play is packaged with the 1.8.2 build. -If it doesn't work the first time, please keep trying for a while. Sometimes it takes a few tries, before you can reproduce this issue. Also try to restart your device, so all other apps are unloaded from memory. Try to open a few more apps, or maybe even less apps, it should eventually be reproducible. -Only tested on a HTC Sensation 4G, running Android 2.3.x.

Comments

  1. Neeraj Gupta 2012-04-02

    Note that the Android OS cleans up the activities if the phone is running out of resources. The behavior is to restart the app in that case as the original activity has been destroyed by the system. You will run into this problem only if a number of applications have been started after an application has been put in background.
  2. Lee Morris 2017-03-09

    Closing ticket as invalid.

JSON Source