androidkotlincustom-data-type

Prepare exercise failed - Unable to prepare exercise. Exercise type for support all Data Types in health services android


Good afternoon, is there a way to indicate an Exercise Type that supports all Data Types in android health services? I have visualized the following example but this one only works for the metrics of a single sport: https://github.com/android/health-samples/tree/main/health-services/ExerciseSample However, in my case I would like to be able to use running and swimming metrics in the same exercise. Is there a way?


Solution

  • Health Services supports at most one exercise at a time across all apps on the device. Your app can only register one exercise update listener at a time, so you can only have an exercise type that supports a single sport and its associated metrics.