Google 피트니스 REST API를 비롯한 Google 피트니스 API는 2026년에 지원 중단될 예정입니다. 2024년 5월 1일부터 개발자는 이러한 API를 사용하도록 가입할 수 없습니다.
이전할 API 또는 플랫폼에 관한 안내는 헬스 커넥트 이전 가이드를 참고하세요. 헬스 커넥트와 Google Fit API 및 Fitbit Web API를 비교하려면 헬스 커넥트 비교 가이드를 참고하세요.
헬스 커넥트 및 API와 통합하는 방법을 자세히 알아보세요.
걸음 수 기록
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
앱은 RecordingClient를 사용하여 사용자의 걸음 수를 기록할 수 있습니다.
DataType.TYPE_STEP_COUNT_CUMULATIVE
데이터에 대한 구독을 만듭니다.
유형을 지정할 수 있습니다.
Fitness.getRecordingClient(this, GoogleSignIn.getAccountForExtension(this, fitnessOptions))
.subscribe(DataType.TYPE_STEP_COUNT_CUMULATIVE)
.addOnSuccessListener {
Log.i(TAG,"Subscription was successful!")
}
.addOnFailureListener { e ->
Log.w(TAG, "There was a problem subscribing ", e)
}
Google 피트니스는 앱이
시스템을 다시 시작하면 구독을 복원합니다. 앱에서 할 수 있는 작업
일일 총 걸음 수 읽기
사용자의 피트니스 기록에서 삭제합니다.
자세한 내용은 피트니스 데이터 기록을 참조하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-31(UTC)
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eYour app can record cumulative step count data using the RecordingClient and subscribing to the \u003ccode\u003eDataType.TYPE_STEP_COUNT_CUMULATIVE\u003c/code\u003e data type.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Fit persistently stores step data and automatically restores subscriptions, allowing your app to access daily step totals even when not actively running.\u003c/p\u003e\n"],["\u003cp\u003eRefer to the provided code example to learn how to implement step count recording in your application.\u003c/p\u003e\n"]]],[],null,["# Record Steps\n\nYour app can record the user's step count by using the [RecordingClient](/android/reference/com/google/android/gms/fitness/RecordingClient)\nto create a subscription to the `DataType.TYPE_STEP_COUNT_CUMULATIVE` data\ntype, as shown in the following example: \n\n```kotlin\nFitness.getRecordingClient(this, GoogleSignIn.getAccountForExtension(this, fitnessOptions))\n .subscribe(DataType.TYPE_STEP_COUNT_CUMULATIVE)\n .addOnSuccessListener {\n Log.i(TAG,\"Subscription was successful!\")\n }\n .addOnFailureListener { e -\u003e\n Log.w(TAG, \"There was a problem subscribing \", e)\n }\n```\n\nGoogle Fit stores the step data from the subscription even if the app is not\nrunning, and restores the subscription when the system restarts. Your app can\n[read the daily step total](/fit/scenarios/read-daily-step-total)\nfrom the user's fitness history.\n\nFor more information, see [Record Fitness Data](/fit/android/record)."]]