[go: nahoru, domu]

Skip to content

Latest commit

 

History

History
 
 

BasicSensorsApiKotlin

Android Fit Sensors Api Sample

A simple example of how to use the Sensors API on the Android Fit platform.

Getting Started

This sample uses the Gradle build system. To build this project, use the "gradlew build" command or use "Import Project" in Android Studio.

NOTE: You must register an Android client underneath a Google Project in order for the Google Fit API to become available for your app. The process ensures your app has proper consent screen information for users to accept, among other things required to access Google APIs. See the instructions for more details: http://developers.google.com/fit/android/get-started

Support

The most common problem using these samples are sign in errors. Users can experience this after selecting a Google Account to connect to the Fit API. This can be seen in logcat.

If you encounter this error, check the following steps:

  1. Follow the instructions at http://developers.google.com/fit/android/get-started for registering an Android client.
  2. Ensure that the Fit API is enabled for your Cloud project.
  3. Check your credentials for your Cloud project:
    • Ensure that your package name for your credentials matches the sample.
    • Ensure the package name matches the applicationId in the app/build.gradle file.
    • Ensure the Signing-certificate fingerprint is entered correctly.

Use the following channels for support: