API ของ Google Fit ซึ่งรวมถึง Google Fit REST API จะเลิกใช้งานในปี 2026 ตั้งแต่วันที่ 1 พฤษภาคม 2024 เป็นต้นไป นักพัฒนาแอปจะลงชื่อสมัครใช้เพื่อใช้ API เหล่านี้ไม่ได้
คู่มือนี้จะอธิบายวิธีเริ่มการพัฒนาด้วย Google Fit ใน Android
ตั้งค่า
ก่อนเริ่มสร้างแอป ให้ทำตามขั้นตอนในส่วนต่อไปนี้
รับบัญชี Google
คุณต้องมีบัญชี Google จึงจะใช้ Google Fit API ได้ คุณสามารถสร้างบัญชีใหม่หรือใช้บัญชีที่มีอยู่ก็ได้ คุณอาจต้องสร้างบัญชีแยกต่างหากเพื่อทดสอบแอปจากมุมมองของผู้ใช้
ติดตั้งบริการ Google Play
รับไลบรารีของไคลเอ็นต์ล่าสุดสำหรับบริการ Google Play ในโฮสต์การพัฒนา
หลังจากทำตามขั้นตอนการตั้งค่าเสร็จแล้ว คุณสามารถเริ่มสร้างแอปได้ หากต้องการเริ่มต้น ให้ดูข้อมูลเกี่ยวกับประเภทข้อมูลที่แอปสามารถจัดเก็บและอ่านได้ ดูข้อมูลเพิ่มเติมเกี่ยวกับการทํางานกับข้อมูลใน Google Fit
[null,null,["อัปเดตล่าสุด 2025-07-16 UTC"],[[["This guide provides instructions for Android developers to integrate Google Fit into their applications."],["It outlines the necessary setup steps, including obtaining a Google account, setting up Google Play services, and acquiring OAuth 2.0 client ID."],["Developers are guided through the process of creating an API client and implementing data access functionalities."],["Before publishing, developers need to apply for verification to ensure data security and compliance."],["The guide also explains the authorization flow users will experience when granting data access permissions to the app."]]],[]]