Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12441] Developer options on Android devices cause Titanium apps to close

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2013-02-20T20:04:14.000+0000
Affected Version/sRelease 3.0.0
Fix Version/s2013 Sprint 04 API, 2013 Sprint 04
ComponentsAndroid
Labelsandroid-configuration, api
ReporterJohn Sanford
AssigneePing Wang
Created2013-01-25T22:39:09.000+0000
Updated2017-03-29T16:50:28.000+0000

Description

"Don't keep activities" option in Developer Options on devices cause Titanium apps to close after the first activity is loaded. This is a major difference between Titanium apps and native Android apps as this option may be checked unbeknownst to the client and thus seen as a bug in the app.

Comments

  1. John Sanford 2013-01-25

    Unfortunately this issue arose when I was touting the benefits of using Titanium to a coworker and the device loaded all native apps correctly, but when it came time to show the apps from Titanium they all seemed to crash (very embarrassing). It took me a couple of hours to figure out what was going on and to determine as to why my personal devices were all functioning correctly and not the company devices. After figuring out that it had to be a setting in the Developer Options I was able to recreate the issue on my personal devices by turning this option on.
  2. Banzai Mobile 2013-01-30

    If I may push for a high priority on this, the occurrence of the 'Don't keep activities' option set to checked turned out to be quite significant among our apps' user base (more than 250.000 active users mainly in Italy). Many blog posts about "Android tips and tricks to squeeze extra performance" are actively suggesting that users check the option.
  3. Ping Wang 2013-02-20

    Turning on the "Don't keep activities" option means that Android will kill every activity which is on pause. In the Titanium app, when the app is launched, the launcher activity gets started first. If there are some other activities need to get started, for example opening a heavyweight window, the launcher activity will be on pause. Then Android will kill the launcher activity since it's on pause therefore the app is killed. This option is only for developers to debug their apps. Turning on this option will also impact android native apps, for example [facebook](http://developers.facebook.com/bugs/269489836511974/) and [firefox](http://support.mozilla.org/en-US/questions/942358). And [AsyncTask](https://groups.google.com/forum/?fromgroups=#!topic/android-developers/CpmcJVeiax4) and [startActivityForResult()](http://stackoverflow.com/questions/13439300/handle-dont-keep-activities-in-android-app) may not work. Mark the ticket as Invalid.
  4. Banzai Mobile 2013-02-22

    No matter how settings are labeled, users who can access and change them will do it. As I wrote, 9 out of 10 crash reporters across all our Titanium apps we could reach HAD THE SETTINGS ON. Facebook is working correctly, like all the system apps I checked. Even some 3rd party apps which have problems do not simply crash at launch. So users can easily live with the settings on and really believe the guru blogger that advised "optimizing the developer options" is a genius. So, is there at least a way to detect the settings and alert users BEFORE the app crashes?
  5. John Sanford 2013-02-22

    If this is not fixed I will switch back to developing for Android natively.
  6. John Sanford 2013-03-01

  7. Lee Morris 2017-03-29

    Closing ticket with reference to the above comments.

JSON Source