How to calculate batteryInDays from available information

Ive searched google and the forums for an answer to this and only found one.

But this answer did not talk about the `System.getStats().batteryInDays` that is shown in the API Docs here.

When I try accessing this in the code I get an error `Undefined symbol "batteryInDays" detected.` Im assuming this means it is no longer part of the API? or was it moved?

I would like to have the battery life in days for the watch face that Im creating. If theres an integrated way of doing this does anyone know how to do so? or if I need to calculate it could someone point me in the right direction?

Thank you for your time!

  • This is only available for the Venu2 System 5 Preview Device (API level 4.1) and f6pro System 5 Preview Device (API Level 3.3) and when using the 4.1.0-beta 1 SDK

    It's not that it's old and no longer available, it's that it's brand new.

  • As far as calculating it, the way I do it is look at (save) the battery level from the past, compare it to the curren't level, and based on that determine days.

    For example, let's say that 24 hrs ago, it was 80%, and now it's 70%, so in 1 day, it's dropped 10%.  Since it's now 70%, with 10% drop in a day, that means 7 days remaining.

  • Oohhh! I read the Docs wrong, I was looking at the feature above. Do you know if they plan to add this to any other watches? I have the enduro and the default display for the battery level is in days.

  • Somewhere I recall seeing a list of devices that would be getting System 5. It may have been at the GDVC, and I don't recall if the Enduro was on the list or not.

  • Hi, the ENDURO is not written in the list, but like the Tactix D, which is the same family then FENIX 6?

  • Hard to say if/when things get CIQ 4.1 or in this case, 3.3.  It won't happen to all the devices at the same time, and given history, the APAC devices will lag behind the WW devices..

    This is a great example of where I use "has" instead of jungles, as apps can make use of the new function as soon as they get the proper FW, vs waiting for the app to be updated for each device in the store.

  • Hi.

    Can I ask for a working solution - example source code that shows battery life in days and is compatible with CIQ 3.2, Fenix6?

    Thank you

  • It's more complex than it may appear, unless you use a simple table look up (75=3 days, for example).

    I have a widget that does it and it uses a background service to report the battery level every x minutes, and using that data can do things like "in the last 12 hours, the battery dropped 6%, and with the current percent being 60%, the battery life should be 5 days.

    This is more complex than just a few lines of code.


  • Hi, I understand that this is not about writing a few lines of code, but there must still be some principle in generating a watch. I'm only interested in the formula - the main source code...

  • As I said, I watch the battery drop over time, look at the remaining battery, and based on the drop over time, figure out how many days/hours are remain.