I'm working with the Google Fit API and I do not know exactly what the parameter that the Google Fit RecordHistory API returns "num_segments", here's an example of the data returned:
Data returned for Data type: com.google.activity.summary
Data point:
Type: com.google.activity.summary
Start: 25 oct. 2017 9:21:24
End: 25 oct. 2017 13:21:24
Field: activity Value: 3
Field: duration Value: 14400000
Field: num_segments Value: 1
Data returned for Data type: com.google.activity.summary
Data point:
Type: com.google.activity.summary
Start: 25 oct. 2017 13:21:24
End: 25 oct. 2017 16:34:12
Field: activity Value: 3
Field: duration Value: 11568153
Field: num_segments Value: 2
In the Google documentation, it is defined as:
Number of segments in a specific activity during a time interval.
But I do not quite understand what you mean by the number of segments.