Can watch app communicate with a Android app even when the Android app isn't running

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?
  • hey can you please share idea how you make communication between Android app and garmin watch app?

  • Hey did you figure this one out?

  • I have established the communication layer between the Garmin watch and Android phone. A few points I have noticed are:

    1. Wait until the Garmin SDK is successfully initialized.
    2. Register the Connect IQ app.
    3. Start listening to receive messages.

    These are some of the observations. However, communication is only happening when the app is in the running state, either in the foreground or background. Once I kill the app, further communication between them is not possible according to the my implementation.

    If you want to discuss silly doubts, you can join my Discord: https://discord.gg/SEJ8a2Q6rY . Me too have many such 
    Thanks,