Hello! I am trying to make an app that has a tile list that has steps, calories, heart rate and floors as its items. I found how to add the steps, calories and the heart rate but I don't know how to add the floors. I've searched a lot and haven't found anything that works. I tried the following but it didn't work.
if (appbit.permissions.granted("access_activity")) {
if (goals.local.elevationGain !== undefined) {
popupText.text = `${goals.adjusted.elevationGain}`;
}
}
popupText.text is the text that I need the number of the floors to be. Does anyone have any ideas on how to do it? Thank youu!!
Answered! Go to the Best Answer.
Try just
goals.elevationGainI know where you got goals.local from; I'll see if I can get that changed.
Also beware that some devices (eg, Versa Lite) don't support elevationGain.
Best Answer