User consent is always required before your app can read or write fitness data. To obtain authorization:
- Register your Android app with a project in the Google Developers Console.
- Specify a scope of access when connecting to the fitness service.
The authorization flow is the following:
- Your app requests a connection, for one or more data types, to the fitness service.
- Google Fit prompts the user to grant your app the required permissions.
- If the user consents, your app can access fitness data of the requested types.
The specific permissions requested from the user depend on the data types that your app specifies when connecting to the service.