Acknowledged
over 1 year ago

App Quits Unexpectedly

We are developing an app for the VivoActive 5 which uses many of Connect IQ's APIs including: Sensor, Communications, and SensorHistory. The app works very well with our Android application using your Android SDK.

The issue is that for no reason our application quits at random times. It is not an application crash because there is no crash log and there is no IQ! image. The user is not quitting the application because we have the screen locked. The application does not contain any exit() calls. OnInactive() and onStop() are both called which seems to me that the application has quit gracefully.

Please see the forum post for more information. It seems as though the OS is killing the application for no reason at random times. Sometimes the OS allows our app to run for 20 minutes, sometimes 20 hours. At some point, tapping the display to wake it up takes you to the watch face instead of the app because the OS has killed the app.

https://forums.garmin.com/developer/connect-iq/f/discussion/371444/app-quits-unexpectedly---no-crash?pifragment-1298=3#pifragment-1298=1

The people on the forum want to know if there is a Connect IQ bug or if this is intended behavior where the OS kills apps without warning.

  • We'll take a look. The only thing that comes to mind aside from what's been mentioned in the forum thread is something related to multitasking. We have rules that allow a certain number and combination of apps to run, and if the limits set by those rules are hit, it can shut down or suspend a running app. Just for illustration, here are some of the basic rules describing what can be run under the multitasking system:

    • Two Device Apps
    • Device App and Music App (if applicable)
    • Device App, Music App (if applicable) and Activity Data Fields
    • A Device App and Activity Data Fields

    It's more complex than this, but perhaps you're either hitting a limit or we have a bug that's causing your app to shut down within the context of these multitasking rules. We may need a copy of your app to reproduce—someone should be in touch.