HealthKit Elevated Heart Rate Notification Variable? - apple-watch

Is there a specific HealthKit variable for the elevated heart rate notifications? I couldn’t find a variable in the data or object types. I am extracting data from the Apple Health app for a visualization using R and showing multiple variables from multiple wearables. I want to use the notification variable to only select heart rate data for those specific observations. Thanks.

Elevated Heart Rate notifications are not accessible using the HealthKit API.

Related

Access real time Heart Rate data on Apple Watch

Can we access the heart rate directly from the apple watch? I know this is a duplicate question, but no one has asked this in like 5 years. I know you can access it from the Health App but I'm not sure how "real-time" that will be.
If you don't expect 100% real-time.
You can use this one: HKAnchoredObjectQuery. I think it has a 300-500ms delay.
A query that returns changes to the HealthKit store, including a snapshot of new changes and continuous monitoring as a long-running query.

User TimeZone sensitive push notifications in Flutter app

I am creating a Flutter app where I need to allow the user to receive notifications each day at a scheduled time that they set, and the notifications will honour the timezone where the device is.
The notifications will contain dynamic content, rather than static content like one might use to set a reminder. So, I'm assuming that I need to use push notifications and a server-side function to create the dynamic content. For example, using a Firebase Cloud Function and Firebase Cloud Messaging.
What I don't know is how I might get the user's device timezone and the scheduled time they configured for their daily notifications into the Cloud Function.
Is this possible at the time that the device registers with Firebase Cloud Messaging? Or do I need to store the schedule time and timezone in Firestore and somehow pull it from there?
Any other tips for system components that can facilitate this use case would be much appreciated.
Thanks,
Luke
OK, after doing some more research with Dr Google, I found two very good YouTube videos that look like they will do what I need:
https://youtu.be/D4wgrgb24o0
https://youtu.be/I0r10sk5fuI
Thank you to Tadas Petra.

Data types produced by apple watch

Does anyone have a list of data types that produced by the apple watch without any additional apps or integrated devices? It must be a subset of these, but I can't figure out which ones
The exact list of data types depends on the model, but the latest Apple Watch models automatically collect data for all of the following HealthKit types:
Active energy
Basal energy
Environmental audio exposure
Headphone audio exposure
Noise notifications
Exercise minutes
Flights climbed
Heart rate
Heart rate variability
Resting heart rate
Walking heart rate average
High heart rate notifications
Low heart rate notifications
Stand hours
Stand minutes
Step count
Walking + running distance
VO2 max
Apple Watch will also collect cycling distance, but only if the user explicitly records a cycling workout. There are also other types of HealthKit data that can be recorded manually by the using the built-in apps on the Apple Watch, such as mindful minutes.

workout information send to phone live

I have created a heart rate monitor on the apple watch and that sends alerts to notifies you if your heart rate gets to low. After creating the app, I realized it does not run in the background. Is there a way to either force the app to run in the background on the watch or send the heart rate information to the phone?
I've investigated this, but don't have any practical experience (yet).
From what I understand, watch apps in watchOS3 can capture continuous heart rate updates with these conditions:
It's a full app (not just an extension).
The app starts a workout
Info.plist has the WKBackgroundModes key set
You'll need to either start the workout from the watch app, or if triggered from the companion iOS app you'll need to call start​Watch​App​With​Workout​Configuration:​completion:​ to start a workout session on the paired watch.
p.s. welcome to stackoverflow!

watchOS get activity data

How can I go about capturing daily activity data from Apple Watch at a high level (gyroscope and accelerometer data) or is that not possible (due to current limitations of the API)?
I am trying to figure out a way to find all occurrences of a custom workout performed during the day by a watch user. User installs the app, grants permissions where applicable. Launches daily to see workouts performed in the last day. The app pulls data, stores it, analyzes it and plots necessary metrics.
I want to know if this is possible - pulling data on launch to run analysis. If so, how?
I see this example from Apple on recording counts swings in a racquet sport but that seems to require instantiating and stopping various CoreMotion events such as startDeviceMotionUpdates and stopDeviceMotionUpdates in order for the app to retrieve them.
Any pointers?