Newbie - what's the best approach to access device activities?

Hi folks, I'm new to the Garmin platform (had a watch for 3 years, and do application integration for 25+ years)

I'm hoping one of you can steer me in the right direction.

I'm wanting to tap into an activity (the cycling activity) and consume/transform the data (assume I have individuals consent - keep this technical).
(I'm initially targeting cycling devices - e.g. Edge 520 etc)

From my reading, it looks like a 'background service' is the way to go. I don't want to create a full blown app if I can avoid it.

Would a 'data field' cut it?

Do they always need a phone nearby for this my app/service to work?

Apologies if I didn't quite use the right language - I come from a different world of integration.

Cheers,

Mick.

  • Can you expand on "tap into" ? There is a lot you can and can't do ;)

    A separate app or widget with or without a background process cannot tap into another app (activity) data.

    On the other side a datafield has access to most info of an activity (check the activity.info class is the API documentation).

    From there you can compute and display a "transformed" info, and record it in the current activity's fit file on the device (you don't need the phone nearby for that). If you're computation  requires to fetch data that is not already on the watch, you will need a phone nearby, same goes if you want to collect data that goes out of the user's private space).

  • Thanks for the reply - 'tap into' means accessing activity data in a read only way.

    So it sounds like I need a phone nearby as I'm wanting to access the activity, and store parts of it elsewhere (fronted by an API on the internet).

    Do I need to write something that runs on the phone? or are there some comms built in already?

    What I'm building aligns more with fetching data from the device and pushing it somewhere else off the watch/device to augment a service.

    Would a couple of approaches be:

    1) App or widget with background process -> does the user need to launch the app/widget or can permissions be granted at install time?

    2) data field - does the user need to add the data field to a screen somewhere for it to work? or the fact it's installed is good enough?

    Thousand thanks folks,

    Mick

  • Garmin's Connect App on the phone acts as a Bluetooth to web proxy, so no need to write a companion app (you would do that for example if you want to store data on the phone to be made available offline later to the watch or if the web service is to complex for the watch to handle directly and data needs to be transformed between the watch and the web service, there are size & speed limits that need to be taken into account).

    1) A widget won't have access to the user's current activity data however you do have  access to some "environmental data" such as GPS position / altitude / speed, or current heart rate. If  the user has started an activity, you won't have access to info such as distance from start , activity timer etc. The background process will be useful only for collecting "environmental data". With an app, you have access to all but you have to write everything. I'm not sure if a background process can "wake up" an app, I'll leave that question to more experimented developers ;)

    2) The setup of a datafield requires user action within a Garmin activity in witch you have several data screens with several fields, you need to change one of the current field to your own field or add a screen with new field(s).