Acknowledged
CIQQA-3357

Battery drain after app exit caused by ActivityRecording API

I have noticed behavior that the GPS gets turned on when I start an ActivityRecording session, without me needing to enable GPS events with 
Position.enableLocationEvents(Position.LOCATION_CONTINUOUS, method( :onPosition ));
When inspecting the FIT file after recording it is full of all the gps information, and when vieing the activity in the Connect app all the location data is as I would expect from an app utilizing GPS. I am using SPORT_RUNNING with a sub sport. I can't find anything in the documentation around whether this is expected or not. This seems reasonable to me and I am fine with this behavior.

The reason I bring this up is I have gotten reports, and have noticed myself, that there are battery drain issues after the app is closed. I have seen the other threads on this topic and have made sure to close the sensors, disable gps events, and close and null out the session and timers.
I clean up the Session as described in the documentation:
session.stop();
session.save();
session = null;

Yet the issue persists.
I have created an alternative version of my app where I don't use the Activity Recording and instead enable/disable the Sensors and GPS directly and I don't see the battery issue.
This leads me to believe there is an issue in the ActivityRecording API that turns on GPS/Sensors for its own use, but does not clean them up appropriately. Resulting in the battery drain.

I have primarily tested on FR955 but have gotten reports of it on Venu3S as well. I know one other person with FR245 and they claim not to be seeing the issue.
Given these API Versions: FR245 => 3.3, FR 955 + venu3s => 5.1, The issue might be localized to a later ConnectIQ API version.
  • Here is a simplified app that reproduces the issue: https://github.com/CABowers/BatteryTest
    I have also found that the bug is dependent on the Sport/Subsport selected. Some seem to activate the GPS and leave it on while others don't.

  • Hi Brandon, you can use

    https://github.com/calugj/anysport

    Users report fast battery drain when app is closed on FR970, FR165 and VA6.

    Thank you!

  •   We'll take another look at this one. If someone is willing to provide a PRG that can reproduce this, that would be helpful, but we'd also ask for the source code so we can consider the implementation.

    Just to set expectations:

    • We collect all bugs reported here, investigate, and pass them along to the responsible team(s)—these reports provide us with valuable feedback and often cover cases that we may not hit in our testing.
    • We're not staffed to provide developer support through these forums, and for a variety of other reasons I won't get into now, it's not practical or feasible for us to report issue progress/status here.
  • There are a couple of problems here.

    1. If this bug report wasn't being looked at anymore then if should have been updated as such. If there is no process to circle back to the developer facing bug reports here in the forums then that is an egregious oversight.
    2. The info you provided indicates that only the FR955 was tested, and nothing about what FW was being run. However, the comments in the bug mention at least three other devices (FR245, Venu 3S, Fenix 8). Were those also tested?
    3. What CIQ app was used to test? Because if it was a small, internal test app then that isn't necessarily helpful; in my experience, internal "test apps", even ones thrown together to test something specific, tend to not mimic a real-world app. I'm reminded of the fact that in the Monkey C extension 1.1.x there was a crash when a developer's project had too many files in it. How is it possible that this bug was deployed? Because of the internal test projects and sample apps in the SDK are small and not at all typical of a project in the wild.
    4. What information do you need to look into this some more? Because either the three or four developers and all our users are lying or this is still happening. Do you want one of us to send you two PRGs of an app that will cause this?

    cc: ,

  • Hello

    Someone on my team did take a look at this and provided the following information, I am sorry it wasn't relayed here.

    "I tried doing some activity recordings from a CIQ app on two FR955 devices. One that started the activity and one that didn't. They drained battery equally overnight. "


    If there is any more information to provide we can certainly look into it some more.