Obtaining sensor data during activity

Hi All,

I would like to record accelerometer data during lap swimming activity, we already have a web app that communicates with Garmin Connect to obtain FIT files so adding the data to the .FIT file would be the easiest way to do this. However after doing some research into Connect IQ I realised that:

A) Developing a Device App would mean that we can access the sensor data and contribute to a .FIT file....BUT the user would not be able to start a new swim activity while our app is running, so we would effectively have to replace the entire native swimming functionality within our app just to add this extra data.

B) Developing a Data Field App would allow the user to continue using native activity recording....BUT it's not possible to access the accelerometer data from a Data Field app (see here), only as a background process which is limited to 30s / 5min.

Can someone confirm if the above is correct....and are there any other options I have not considered? 

  • Anyone....? Would really appreciate some input on this

    To summarise... it seems like there is no way to record AXL data while still using the watches native activity recording features?

  • I will answer my own question in case its useful to someone...

    You can still utilise the native activity recording features within your Watch App by starting a new activity using the method

    ActivityRecording.createSession(...)
    and specifying the Sport and Subsport. The activity results can then be obtained in realtime via 
    Activity.getActivityInfo();
    So in the end I just need to create my own UI for displaying the data and hope that users don't miss the Garmin UI :-)
  • Thanks for answering your own question. I want to do something similar, accessing accelerometer to recognize pole plants while xc skiing. Does the activity get saved and uploaded to Garmin Connect like the native activites along with the accelerometer data? It's a shame that one cant make a datafield. Do you happen to have a app framework that does this that you would like to share?

  • Hi,

    Yes the activity will still get uploaded to Garmin Connect when you save it and you can use the FIT contributor to add your own custom .FIT fields if you are planning on processing the data remotely.

    I can't share my codebase but have a look at the RawLogger connect IQ app, it is open source and you can easily adapt it to suit your needs

  • Thank you so much! I hope I can make it work:)