How to guarantee message delivery from watch to app.

Former Member
Former Member
I'm trying to send data from the watch to a companion app using Comm.transmit()... However, if the phone is not in range or turned off the message will fail to send. Then if the user closes the watch app and later opens the companion phone app they will not see the message. Is there a way to guarantee message delivery to the app, similar to the way the Garmin Connect app sync's data from the watch?

For instance, if there were a way to 'wake up' the watch app from the phone this would solve the problem.
  • Former Member
    Former Member
    Is there a way to guarantee message delivery to the app

    To my knowledge there is no built-in functionality to guarantee successful message delivery. In the two cases you listed, where the BLE link is not present, you could work around this in your app by checking the status of phoneConnected. In other situations you could implement a simple confirmation setup, where the watch does not consider message A delivered until the phone sends back a confirmation for message A.

    if there were a way to 'wake up' the watch app from the phone this would solve the problem

    I don't understand how this would solve the problem of the phone being disconnected from the watch, aside from assuming that the connection is reestablished at the time of phone access. There is functionality in the mobile SDK to request an application to wake, but it requires user input to start the app. Might be able to set up a polling system though if you use a background process.
  • Former Member
    Former Member
    I don't understand how this would solve the problem of the phone being disconnected from the watch, aside from assuming that the connection is reestablished at the time of phone access. There is functionality in the mobile SDK to request an application to wake, but it requires user input to start the app. Might be able to set up a polling system though if you use a background process.


    The scenario is this : The user uses the watch app during a workout. Their phone is not nearby. They finish the workout on the watch, and now I'd like to send the workout stats to the companion app. Since the watch is unable to communicate with the companion app this is not possible. However if the companion app were able to query the watch at a later time when they are connected, then the companion app will be able to get the workout stats that were not successfully sent before.

    Would a background process work for something like this? How would you suggest going about that?
  • Former Member
    Former Member
    Would a background process work for something like this? How would you suggest going about that?

    Potentially. You could queue up a temporal background event for every five minutes, and in the background check if the phone is connected. If it is, it could attempt to send the info on to the partner app. The partner app could send a message requesting data for the background event to later process as well, if you find that necessary.