Question about location, sensors and other things inside watchface

Hi,

Could someone please tell me is it possible or not to do this things in the Watch Face (not widget or app)

1. How to Get last known location or current location? If yes, how to do it? Because If I try to do anything with Position object it gives me error about permisions. If I give this permission in the Project settings, I get an error like "Position permissions are not supported for Watch Face".

2. How to Get any other information from sensors? I would like to get barometer and altimeter data, but I have the same issue with permissions.

3. How to calculate sunrise and sunset? Is there build in function in Connect IQ or I need to implement it by myself?

4. How to get alart clock information? I want to print what is next available alarm clock?

I tried to find answer in the documentation, but I could not.

P.S. Why many functions are not available for watch face and available for widget or app? Like sensor, position, communications and etc? What is the point to make these limitations? Can garmin remove these limitations in the next release?
  • Hi,

    Could someone please tell me is it possible or not to do this things in the Watch Face (not widget or app)

    1. How to Get last known location or current location? If yes, how to do it? Because If I try to do anything with Position object it gives me error about permisions. If I give this permission in the Project settings, I get an error like "Position permissions are not supported for Watch Face".

    2. How to Get any other information from sensors? I would like to get barometer and altimeter data, but I have the same issue with permissions.

    3. How to calculate sunrise and sunset? Is there build in function in Connect IQ or I need to implement it by myself?

    4. How to get alart clock information? I want to print what is next available alarm clock?

    I tried to find answer in the documentation, but I could not.

    P.S. Why many functions are not available for watch face and available for widget or app? Like sensor, position, communications and etc? What is the point to make these limitations? Can garmin remove these limitations in the next release?


    It's true that we've placed several limitations on watch faces, the primary motivation being the conservation of battery life. But it's also why we have widgets and apps available, which don't have these same limitations.

    It is possible to do some of the things you're asking about on watch faces. I'd recommend searching around the forums, especially for things you'd like to do that aren't immediately available in the API (such as sunrise/sunset). Many of these questions have been asked and answered in the past. For example, here's a thread discussing the last known position on watch faces:

    https://forums.garmin.com/showthread.php?330836-Latest-known-position-in-watchface

    Here's another discussing sunrise/sunset:

    https://forums.garmin.com/showthread.php?318908-Access-sunset-sunrise-times-from-IQ-watchface

    As an aside, the OP on the sunrise/sunset thread has successfully implemented watch faces that display the sunrise and sunset (e.g. https://apps.garmin.com/en-US/apps/47670d78-16f4-442f-a475-2eaef67fd3ff)
  • Thank you for the answer about last position. It works now for me as well.
    Sunset I almost implemented by myself as well looking at your link


    About protection of battery life. It is question of probability and risk assessment. There is 2 possible options:

    1. If we have API without limits. Somebody with wrong hands will create bad watchface, which will use all the battery in 1 day and people will complain in public social networks, and because of this Garmin will lose some profit. What is probability of this case? How high is the risk?

    2. If we have API with limits, probability that somebody will create bad watchface will be lower, but still somebody can create bad watchface, for example by puting loop and calculate Sin(x) 1000000 times. But in this case, custom watch faces quality will be worse. People will complain that there are no interesting watchfaces in the market and all of them have more or less the same functionality, because people already got everything from this API. And this is the case. As I see there are only 3-5 different types of watchfaces, all others just different pictures, but the same functionality. Developers will complain as well. Garmin will lose profit as well. What is probability of this case? How high is the risk?

    For me option 2 has more probability and more negative effect than option 1. For option 2 it is possible to do something, for example some testing before approval on app.garmin.com can be done, and if watchface use more battery per hours than recommended by Garmin, reject watchface or put big red warning near it's name. Anyway in this case people can at least create custom watchface for themself. Or another options, if I check sensor permissions in my project for watch face, in this case Connect IQ could allow me to build project for my watch for personal use, but not allow to upload to app.garmin.com. This is also a solution.

    And what about alarm clock settings access? It should not be very energy consuming give access to it? I would like to see on my watchface what is my next alarm clock time.

    Also it would be good to have weather and next calendar events on my watchface.
  • ... by puting loop and calculate Sin(x) 1000000 times.


    The CIQ watchdog timer should catch this.

    Also it would be good to have weather and next calendar events on my watchface.


    I have two watch-apps that look like a watchface, and both display weather info (one from the inet, one from a Temp Sensor) so there is a way to provide something with other data, just not a watchface. The inet version with 1 min screen updates and 20 min refresh of weather data, burns more battery than a watchface (not a lot more, but more), and the Tempe version burns even more. The inet version also has 4 screens with different data, which can't be done in a watchface.

    So the functionality is available, but just not as a "watchface". And a user knows that they run differently (battery wise, etc) than a watchface.