V6.2.1, It's about the Apple Watch!

About three weeks ago I realised Heart Analyzer V6.2. Amongst some other features and fixes, the update launched a feature to allow the user to view their heart rate in a graph right on Apple Watch. Whilst this is exciting for all users, It is particularly amazing for Apple Watch Series 4 users. This is because the graph can be displayed as a complication on the new Infograph Modular watch face! This really is a mile marker for third party Apple Watch apps and I was thrilled to be one of the first (possibly the first) apps to offer a heart rate graph after Apple. Now, there I said it, after Apple. Some may point out that with the reliability of Apple’s complications compared to third party apps, why would anyone use Heart Analyzer? Well the graph for heart rate on the Apple Watch Series 4 is mediocre at best, it’s a fixed timescale graph, always showing the day as a full 24 hour period. This means that if you look at is after midnight, the graph shows nothing, literally nothing. It’s also a scatter graph. This is the most accurate way to view the heart rate data, but it’s not the easiest to read, and it’s not the most visually pleasing. These reasons are why Heart Analyzer currently offers an auto-adjusting line graph with 3 or 12 hour auto ranging time scales.

Today I’m delighted to say that with Heart Analyzer V6.2.1, this graph is now customisable for our premium users with the App Customisation add-on. You can either leave the default auto ranging option of 3 or 12 hour graphs enabled, or choose one of the following:

  • A 6 hour fixed graph

  • A 12 hour fixed graph

  • A graph of your heart rate showing todays’s heart rate over a fixed 24 hours period of the day with yesterday’s heart rate graph overlaid 

  • You can also choose the colour of these graphs, either the defaults blue tint, or green or red.

Given that these graphs are even available on the watch face for Series 4 users, I though it was important to give users a certain level of control over how they look.

As well as these customisation options, all the complications that Heart Analyzer offers have had a significant under the hood revamp. Previously, the complication would update roughly every 10 minutes. At that point, the app would ask the Apple Health store for the users data relevant to the complication. If the complication showed your most recent heart rate reading, the app would ask for the most recent value from the store. If the complication showed the whole day’s heart rate, that is what it would ask the store for…. Every 15 minutes. This involved repetitions of data requested, and the HealthKit store on the watch is not exactly super efficient. These queries were eating battery and causing the watch app to be terminated by the system for taking too long.

For this update, I wanted the heart rate graph to show data from the previous day as well as the current. I knew this meant a new design was needed.

To solve this problem, I’ve implemented a time based FIFO (First In First Out) system. This means that when the app first launches, it samples all the recent heart rate data since the start of the previous day. From then on it only samples for new data points since when it last checked. These samples are much quicker and any results are always new data, which gets added to the local store. Once a day when midnight passes, the app clears out old values that will no longer ever be displayed from the apps local database.

This way the app performs regular, consistent, small samples and in the background it maintains a local picture of your recent heart rate.

The results from implementing this have been astounding

  • The complication now updates roughly every 10 minutes

  • The app is more efficient on battery life

  • The app never gets killed by the system for taking too long to execute

  • The app launches faster than ever from older Apple Watch models

I really hope you enjoy this new experience. I really believe it’s a big step forward for an Apple Watch app. I hope to take this good base in future and add features to the watch app, giving you more information on your wrist, where ever you are, and all standalone from the iPhone app.

All the best

Simon

Previous
Previous

The Version 6 Retrospective

Next
Next

Heart Analyzer, an update