09-08-2014 05:27
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

Jogger
4
0
1
09-08-2014 05:27
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I have implemented Fitbit4J in my application and completed OAUTH process, I can also access the user's activities using the OAUTH_TOKEN and SECRET provided upon successfull completion of OAUTH process. However there I hit a road block, I could only access the number of steps which is manually added by the user however the activities which were synced by the fitbit device were not fetched by the API calls. How can I fetch all the data regardless of the way it was added ?
I am using below function to fetch the data
Spoiler
public List<ActivityLog> getActivies(Map<String, Object> accessRes) throws Exception {
FitbitAPIClientService<FitbitApiClientAgent> clientService = //assign Client service;
APIResourceCredentials resCredentials = //assigned resource credentials here
LocalDate today = LocalDate.now();
Activities activity = clientService.getClient().getActivities(new LocalUserDetail(resCredentials.getLocalUserId()), FitbitUser.CURRENT_AUTHORIZED_USER, today);
return activity.getActivities();
}
FitbitAPIClientService<FitbitApiClientAgent> clientService = //assign Client service;
APIResourceCredentials resCredentials = //assigned resource credentials here
LocalDate today = LocalDate.now();
Activities activity = clientService.getClient().getActivities(new LocalUserDetail(resCredentials.getLocalUserId()), FitbitUser.CURRENT_AUTHORIZED_USER, today);
return activity.getActivities();
}

0 REPLIES 0
