fetching user activities from all time

Hi,

I'm trying to calculate some basic stats on a watch app but UserActivityHistory seems to return only a few of the last activities, presumably those that are stored on the device itself (?). That would mean also can't access the activitise that you have recorded through another device, say a garmin edge for example.

Since the stats i'd like to calculate require the alltime activities (running and cycling) of a user, i suppose the correct way would be to request on garmin connect website, but is it doable from a watch ? Do I need the activity API, which seems to be accessible for "approved businesses" only (so not to me) ?

Thanks !


The code below is what makes me think only part of the activities are fetched :

public function somme(){
var userActivityIterator = UserProfile.getUserActivityHistory();
var sample = userActivityIterator.next();
var n = 0 ;

while (sample != null) {
    if (sample.type == Activity.SPORT_RUNNING){
        n+=1 ;
    }
sample = userActivityIterator.next();
}
return n;
}