Ant Generic Channel Widget Connectivity issue

Former Member
Former Member
Hi all,

I am new to Garmin development, but I want to create a widget that basically works as an ant slave that listens for a broadcast message from a master and displays the message on the screen. So far the app successfully displays the messages in real time when you first start the widget. However once I move to watch face for a couple minutes when I come back to the widget it stops receiving messages from the master. if I quickly move between the watch screen and the widget it still receives messages from the master. Does anyone who has experience with using the generic channel in widgets know what could be causing this? also are there any general things that people who are new to working with generic channels should keep in mind while developing?
  • I have this functionality working in an application but not a widget. I haven't done any real widget development. Is it getting fully re-setup every time you switch to it or is the state being maintained for some amount of time? It is certainly possible that the firmware code has issues with this that haven't been uncovered as I suspect this is a pretty uncommon task. What device are you on?
  • Former Member
    Former Member over 6 years ago
    I tired both saving state in-between starts and fully resetting up the channel and neither works. I am running on a vivoactive HR. You say it is an uncommon task, as i am new to garmin development there maybe be an easier way to achieve my end goal. The basics of what I am trying to do is have some generic ant sensor send data and then take that data and display it in a widget. would it be easier to make a data field and then figure out how to display that data field in a widget?
  • Sorry, I was thinking generic, as in searching for any type of sensor. And that would be uncommon. But there are definitely apps - and widgets - out there that do open Ant+ Channels for specific devices but I do suspect not many. Usually they would be related to special hardware like Stryd or Runscribe pods. Some are there just to have more control of the data from say a HR monitor, or to grab power data for devices that don't support power meters. Or maybe to grab data from multiple power meters to compare.

    One thing you need to make sure of is that the sensor isn't paired natively to the watch. If it is, and the watch connects, you won't see it in your code. Could this be what is happening to you?

    What are you actually trying to accomplish? What kind of ant device are you wanting to pair with only temporarily in a widget? Widgets are generally very short term. You can't display a data field in a widget. They are completely independent types of CIQ apps.

    I do have a widget that I did just as a proof of concept that connects to an Alpha dog tracker but haven't played with it enough to know if it has symptoms like you are seeing. Partly it doesn't seem like a useful widget as I suspect anybody wanting to see where there dog is won't want it to keep going away and back to the watch face. An application or data field makes much more sense.
  • Former Member
    Former Member over 6 years ago
    They sensor I am ultimately trying to pair with is a Continuous Glucose Monitor. To be clear it is not an ANT+ sensor (I believe there is not ANT+ profile for CGM), it is just a custom ANT sensor. I am fine with the sensor being paired with the watch in the background I was just hoping to be able to display the sensor values using a widget.
  • That definitely makes more sense than most devices to be just a widget as you do want to just occasionally be able to glance at it. And you don't need to worry about it being locked out from your widget by being paired with the watch as that is not a sensor you even can natively pair I believe.

    I wouldn't think there is any difference with an Ant vs Ant+ channel for the widget.

    So you say it works if you go right back to the widget, but not if you wait a couple minutes. What if you wait 10 or 60 minutes? Does it eventually start working again? There is certainly a potential for the system to be holding on to some resource, either by design or as a bug, keeping you from reconnecting to the channel.
  • Former Member
    Former Member over 6 years ago
    The amount of time for going right back to the widget is a few seconds and the waiting a couple minutes is waiting for 2 minutes. It does not appear to come back at all after that unless I power cycle the watch. I did not try waiting for 10-60 minutes but I will try that once I get home today. The idea that the system could be holding on to some resource is interesting. when the app stops I am currently releasing the channel(I have tried closing it as well, I am not sure of the difference). I also log the result when I open the channel and it always comes back as true, even when It appears that I getting no messages from the sensor.
  • Former Member
    Former Member over 6 years ago
    So it appears that no matter how long I wait the the widget does not start working again until I power cycle the watch.
  • Have you solved this issue? I am trying the same but for a light network and I cant maintain the channel open even after leaving the app or widget. A data field isnt really what I am looking for because there is no user input possible(without touchscreen that is)

  • From a widget or device app there's no way to keep the connection open when the app terminates.  It's the same if you use BluetoothLowEnergy.

    It's simply not possible.

  • That's a shame;( do you know then if there is a way to get user input on a data filed on a watch without touch screen? I just want to be able to change my bike light modes from the watch