I am trying to build a wearos app that helps caretaker monitor HR and GPS coordinates of patient/wearer in near real-time. I used PassiveListenerService interface, and also tried HealthServicesClient/PassiveMonitoringClient API along with PassiveListenerCallback interface. Both are giving me new data points when the user is interacting with the watch app, but not getting any new data points when the user is not actively interacting with my watch app. How can I get HR and GPS coordinates at a steady rate, for example, every 5 seconds ?
Should I be using HealthConnect instead of HealthServices if I want to continue to receive HR data points even when user is not interacting with my wearos app ? What about GPS coordinates ?