This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private GoogleApiClient stepClient = null; | |
private float scaledStepCount = 0; | |
private void countSteps() { | |
if (stepClient == null) { | |
stepClient = new GoogleApiClient.Builder(getBaseContext()) | |
.addApi(Fitness.HISTORY_API) | |
.addApi(Fitness.RECORDING_API) | |
// When user has multiple accounts, useDefaultAccount() allows Google Fit to | |
// associated with the main account for steps. It also replaces the need for |