

Heart rate, speed and location data types are used in this example. This example specifies that your app wants to access activity session metadata,Īnd it also specifies the data types it wants to read within those sessions the addDataType(DataType.TYPE_LOCATION_SAMPLE, FitnessOptions.ACCESS_READ) addDataType(DataType.TYPE_SPEED, FitnessOptions.ACCESS_READ)

addDataType(DataType.TYPE_HEART_RATE_BPM, FitnessOptions.ACCESS_READ) accessActivitySessions(FitnessOptions.ACCESS_READ) Specify what type of session your app needs to access, using the appropriateįor example, to read sessions relating to running you might choose: val fitnessOptions = FitnessOptions.builder() Access to sessions uses the same authorization scopesĪs data types, which you should request as follows: If you want to read or write sessions, then your app must get the user's Interacting with other fitness apps this way could Increased user engagement: You can show your users available sessions and theĪpps that created them.You can query detailed or aggregate data from the fitness store and findĪvailable sessions, without needing to implement your own schema and Your app doesn't support tracking, you can still read sessions in Google Fit. Leverage the Google Fit platform: If your users don't track their activity, or.Sources to supplement and enrich your session information. More complete data: Google Fit also merges data from multiple.These workouts lets users see their activity across both apps. Tracking (where users can start and stop an activity), having sessions for Consistent user experience: If your app or companion device allows activity.They can see all their activities for the day in Useful for users: Sessions help you organize activity data and workouts in a.

The type of activity it's capturing (for example, a run).A descriptive, friendly name (for example, "morning run").Sessions themselves don't contain details about the activity. Period (like steps, speed, distance) would be associated with that session. Run, a session could be created and all the fitness data that's within that time For example, if a user tracked when they started and finished a 3km Sessions group datasets from a specific time period, that was collected duringĪn activity. ForĮxample, a breathing session, a walk, a run, or a night's sleep are each They appear in the Google Fit app journal page. Sessions are a way for users to quickly and easily see a list of all the mainĪctivities they've done.
