Authorization and permission scopes
User authorization is required before your application can read or write any fitness sensor data. User authorization is a two-step process. Step one is the registration of your application with the Google developer console, which is done outside your application. Step two is getting authorization from the user by using relevant scopes inside your application.
Registration with the Google developer console
Every application that needs to access fitness sensor data needs to register with the Google developer console. The followings steps explain the registration process:
- Open the Google developer console in any browser.
- Create a project from the console and enter your project name, which could be the same or different from your application name.
- Find the Fitness API from the APIs and Auth console menu and turn it on. Now Fitness API should appear at the top of your API list.
- Go to the Credential console menu and click on Create a new Client ID. This will open...