Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6051] App will not load on Android after creating a foreground service, swiping app closed, and then attempting to reopen app

GitHub Issuen/a
Resolution Date2018-12-17T21:52:23.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Reporterjon kravetz
AssigneeShak Hossain


Here are the steps to reproduce: 1) Create an app that launches a foreground service with some service running on an interval. 2) Open the app the first time, you should see the foreground service in the notification panel. 3) Swipe the app closed. 4) Reopen the app. At this point, the app will be stuck at the splash screen. You will only see the following in console: [INFO] TiRootActivity: (main) [0,0] checkpoint, on root activity create, savedInstanceState: null [INFO] TiApplication: (main) [705,705] Analytics have been disabled [INFO] [Appname] [Appversion] (Powered by Titanium [INFO] TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = com.pilrhealth.ema.EmaActivity@100128d Notably you will not see, [INFO] TiApplication: (main) [5,533] Titanium Javascript runtime: v8 This same use case works fine in 7.4.1.GA.


  1. Sharif AbuDarda 2018-12-06

    Hello, Please provide a standalone sample project that demonstrates the issue. Thanks.
  2. Joshua Quick 2018-12-07

    This is a known design issue that will be addressed in Titanium 8.0.0. Please see: [TIMOB-26538] The above mentioned ticket also provides 3 work-arounds that you can use. If you want the foreground service to work after backing out of the app, then I highly recommend that you use the "exitOnClose" solution. You'll need to use that solution in Titanium 8.0.0 as well because the above mentioned ticket will automatically terminate the service upon app exit.
  3. jon kravetz 2019-03-12

    (I also made this comment on TIMOB-26538 for visibility) These changes have wrecked our app. From what I understand foreground notifications were created for Android so background services can still run when the app is EXITED. The caveat is that a foreground notification persists in the notification panel so the user knows the app is still using memory. In 7.4.1.GA i can start several background services on android (location tracking, accelerometer, notification scheduling, etc) and when i close the app since I created a foreground notification, the services still run perfectly. With the changes in 7.5/8.0 when i EXIT the app the foreground notification persists, but then crashes because the underlying services are stopped automatically when the app is closed. We also do things with our app on rebooting the device, etc.... The workarounds above are only for asking the back button to background the app rather than close it. This does not help. Do we need to create a new ticket? What do we do?

JSON Source