심박수 체크 앱을 만들어보자

참고 프로젝트 : https://github.com/android/health-samples, https://github.com/android/wear-os-samples

1. wear ui 구성 요소

2. ExcerciseClient로 심박수를 체크할 때 주의할 점

만약 AmbientStateUpdate의 AmbientState가 Ambitent라면 심박수가 들어오지않는다.

이럴땐 batchingModeOverrides를 추가해주면 5초마다 심박수가 들어온다.

 val config = ExerciseConfig(
            exerciseType = ExerciseType.BIKING,
            dataTypes = dataTypes,
            isAutoPauseAndResumeEnabled = supportsAutoPauseAndResume,
            isGpsEnabled = false,
            exerciseGoals = exerciseGoals,
            **batchingModeOverrides = setOf(BatchingMode.HEART_RATE_5_SECONDS)**
        )

3. [Wear OS의 건강 관리 서비스](https://developer.android.com/health-and-fitness/guides/health-services?hl=ko&_gl=1*1qn43v3*_up*MQ.._gaMTcyOTU3NTE5Ni4xNzEyMTkwNzI4_ga_6HH9YJMN9M*MTcxMjE5MDcyNy4xLjAuMTcxMjE5MDcyNy4wLjAuMA..)*

ExerciseType 으로 원하는 운동을 지정해 줄 수 있다. (biking, bench press 등등)

ExerciseUpdateCallback을 받아 데이터를 처리한다. (onExerciseUpdateReceived 로 최신 데이터가 들어온다)