Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to fetch user's actual steps (synced by device) using Fitbit4J API ?

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();
    }
Best Answer
0 Votes
0 REPLIES 0