Hello, I've been trying to search for how I should achieve it, but I am unable to find any way to do it, can anybody be kind enough to tell me what to use and how to achieve it?
Regards
Hello, I've been trying to search for how I should achieve it, but I am unable to find any way to do it, can anybody be kind enough to tell me what to use and how to achieve it?
Regards
Either your Device App (https://developer.garmin.com/connect-iq/connect-iq-basics/app-types/) talks to a companion app or makes http requests to get a ist of the courses and then display it as a menu.
It uses exitTo() to start a cource. In this case, only native apps understand courses,
Exit the current app and launch a new app.
This may only be called by watch-apps and widgets, and may only target watch-apps (both native activities and Connect IQ apps) and widgets. This is an asynchronous request that presents a confirmation dialog to launch the Intent. If confirmed, the current app will exit. Otherwise, the app will continue to run without exiting.
Parameters:
The Intent to trigger
The PersistedContent module has methods to list courses saved on the device.
getAppCourses() as PersistedContent.Iterator
Get the subset of courses installed on the system that are owned by the application.
...
getCourses() as PersistedContent.Iterator
Get the courses installed on the system.
For a given course, you can:
- get its name
- get its ID
- remove it
- convert it to an intent so you can launch it (as Jim mentioned)
To download a course (in FIT or GPX format) to the device, you would use Communications.makeWebRequest.
I am trying to use 3.2.4. Retrieve API from the documentation, which takes course ID, and I don't know where to get that course ID, can you kindly tell me the direction in which I should look ?
Got It Sir thank you for your answer :)
Got It, Sir, Entire flow is Clear, but need to know which API should I use to get Courses, from Garmin. 3.2.4. Retrieve Courses API (confidential) is suitable but it requires courseID which I don't know where to get it from.