Access sunset / sunrise times from IQ watchface?

Former Member
Former Member
Is there a way to access the sunset and sunrise times from the watch from an IQ Watchface object?
They can be displayed on the default digital watchface for example, so they must be already calculated and stored somewhere, would be a pity to do that all over again.
I would like to mark them on my own IQ Watchface, hence the question.
  • Connect IQ doesn't have an API to access the sunrise and sunset times, and we don't have one planned for technical reasons. It must either be calculated by the app, or obtained using a web service (which isn't available to watch faces).
  • Former Member
    Former Member over 9 years ago
    Thank you very much for your reply. I am curious about this technical reason though :-)
  • I don't recall all of the specifics (this was discussed several months ago), but I believe it had primarily to do with most devices not having this functionality available.
  • Hi Brandon,

    The consequence of not having the sun times available in the API is:
    - calculating this function in a watch face app is a complex process (http://williams.best.vwh.net/sunrise_sunset_algorithm.htm) that depends on location
    - the watch face does not have access to location data
    - therefore the watch face can't calculate sunset/sunrise.

    Watch face API access:
    Application
    Graphics
    Lang
    Math
    System
    Time
    WatchUi
    Sensor*

    Location is only available in Activity and Location APIs


    I have the sun time and moon cycle on my watch face and can't imagine not having it. It's more useful than Zulu time for me.
    I imagine a number of people are in this position. If sunset and moon cycle is also the most important additional data to them, then this completely cuts possible innovation in this field, as no-one would ever select a watch face that doesn't provide at least the same data.

    For me, the same applies to the status icons. Bluetooth and battery status are available but not alarm clock. This should be added to the API to make any developed watch face at least equal to the existing.

    Just my two cents.
  • I understand your position--you're not the first to want this on their watch faces. :) Even if we had the sunset/sunrise times available in the API, you're correct that it wouldn't be available to watch faces. That's a separate issue related to the low power mode of watch faces and decisions that have been made to ensure battery life is conserved.

    For now, the compromise we have is that sunrise/sunset can be made available as a widget, which is a quick jump away from your watch face. Not the best solution for everyone, I realize.
  • Thanks a lot for the honest reply!
  • Former Member
    Former Member over 9 years ago
    That's a separate issue related to the low power mode of watch faces and decisions that have been made to ensure battery life is conserved.
    For now, the compromise we have is that sunrise/sunset can be made available as a widget, which is a quick jump away from your watch face.

    I actually, I don't understand this decision at all.

    This should be decided by the user / developer.
    I would like to have weather info on my watchface, sunset/rise, see my appointments, notifications, etc.

    Yes, I do understand that if you do more complicated stuff in the watchface, it drains the battery more quickly. And if you don't, it shouldn't.

    That tradeoff should be mine to make, I should be able to decide wether I take a hit on battery level for more functionality.

    Besides, checking the calendar or updating weather info once an hour or so can't be draining the battery that much...
    Besides, bailing out to a widget to check the calendar or update weather info once an hour drains the battery THE SAME AMOUNT, it takes just much more effort :(
  • Former Member
    Former Member over 7 years ago
    Hi,

    Has there been any movement on this? I’m looking for this as well.

    The data seeks available to the Garmin watchfaces so the power consumption argument is out the window.

    Thanks.
  • To be honest, I think many folks have just added their own sunrise/sunset calculation to watchfaces. There are likely a few example on github and other places, and code was posted here over time. Have you tied searching this forum for something like "sunrise sunset"?

    Here's a thread with some code linked.
  • Former Member
    Former Member over 7 years ago
    Yeah... though actual access would still be better and ultimately more accurate.

    if they provided this on the official watch faces then it should be available to ConnectIQ watch faces.

    I take it that it’s still not available then. I couldn’t see it in the SDK API.

    Come on Garmin!