Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example for Batching Modes #181

Open
jluebbe opened this issue Oct 20, 2023 · 3 comments
Open

Example for Batching Modes #181

jluebbe opened this issue Oct 20, 2023 · 3 comments

Comments

@jluebbe
Copy link

jluebbe commented Oct 20, 2023

I've been trying to use batching modes as described in https://medium.com/androiddevelopers/wear-os-home-workouts-with-health-services-b9951fa9e0dc, but on my Pixel Watch 1, I only get an empty list from exerciseClient.getCapabilities().supportedBatchingModeOverrides.

Is it possible to use them with the PassiveDataCompose example? Or are they intended to be used differently?

Which devices support the 5 seconds batching mode?

@breanatate
Copy link
Contributor

Is your Pixel Watch 1 running Wear OS 4? I believe there was an issue with batching mode support on that particular build, but a fix should be rolling out shortly.

It is not possible to use BatchingMode with PassiveMonitoringClient--it's only for Exercise. What sort of use case did you have in mind?

@jluebbe
Copy link
Author

jluebbe commented Oct 25, 2023

Is your Pixel Watch 1 running Wear OS 4? I believe there was an issue with batching mode support on that particular build, but a fix should be rolling out shortly.

Yes.

It is not possible to use BatchingMode with PassiveMonitoringClient--it's only for Exercise.

Ah, yes. With the new BODY_SENSORS_BACKGROUND permission, I now see that a BatchingMode is supported in ExerciseSampleCompose at least for RUNNING. I'll check if that works for me.

What sort of use case did you have in mind?

I'm trying to find some way to trigger a notification relatively quickly after a set heart rate BPM is exceeded (for pacing). With PassiveMonitoringClient, the delay is too large, so I'm looking at ExerciseSampleCompose. As the HR monitoring should be active for most of the day, I'd like to keep the battery usage as low as possible.

I also tried to set goals for a specific HR level, but it didn't seem to work.

Is there a reference for the available exercise types (like running, walking, ...) somewhere?

@breanatate
Copy link
Contributor

I'm trying to find some way to trigger a notification relatively quickly after a set heart rate BPM is exceeded (for pacing). With PassiveMonitoringClient, the delay is too large, so I'm looking at ExerciseSampleCompose. As the HR monitoring should be active for most of the day, I'd like to keep the battery usage as low as possible.

I see. This sounds like a heart rate alert event would be helpful to have in PassiveMonitoringClient. That way, you could set HR thresholds and the app could continue to monitor in the background with low impact to battery. You mentioned the HR monitoring would be for pacing, but that it would continue for most of the day --is the primary use case for this Running?

Is there a reference for the available exercise types (like running, walking, ...) somewhere?

Yes, that's available here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants