I am trying to retrieve information from the internet via the Communication API in my watch app. However, this web URL returns data in XML format, and additionally is not secure, hence accessing it from the watch directly using the Communications API for the Garmin Connect Mobile app does not seem to work. I decided to use the Android SDK provided and use the ConnectIQ API in my own Android app to do this.
Long story short, I managed to do this successfully. But at the moment, I need to open the Android app to trigger it to send data to the watch. However, I'd like to be able to do this automatically, whenever I open the watch app on my smartwatch, rather than have to manually trigger it via the phone. Ideally, this should work even when the app is not actively running on the phone in the foreground. Basically, this replaces the typical route of going through the Garmin connect mobile app with my own app.
What should I do to make this happen? Do I need to create a background service in my phone app that runs constantly on the phone? If so, will that be cause battery drain issues with my phone?