Accelerometer logging with existing training type

Hello everyone,

what is the best way to implement the collection of accelerometer data into a fit file?

1. For example, I would like to use a regular bike workout, use navigation, segments, and so on. But at the same time add accelerometer readings to the fit file.
Is it possible to do this or is it necessary to create your own type of training?

2. And is it possible to continuously collect accelerometer data?

I know that with this

Sensor.registerSensorDataListener

function I can "monitor" the sensor readings, but there is a time limit of 4 seconds.


Or it's possible to use the

SensorLogging.SensorLogger

function to record all the readings for the entire workout at a frequency of 25Hz?