Sun rise / sunset

Could some kind person provide an actual working example of how to get sunrise/sunset info for a watch face? TIA!
  • Thanks for the hint with the object store, i'll have a look at it!

    This snipped is just a snipped from my test environment and the code isn't that clean i know :D

    I tried it with my location. I replaced the codelines in the SunCalc class in the function calculate with my current GPS location. Additionaly i deployed the watch face on my Forerunner and after getting a GPS signal, i also got the incorrect times.

    Seems like i need to take a closer look and take a look at calculating sunrise/sunset if nobody got a fix or code snipped for calculation.
  • Former Member
    Former Member over 7 years ago
    but what about users of the 920XT for example, barrels are not supported

    Barrels should work work on 1.4.4* devices as well; I would start a new thread if you are having issues running apps built with them on up-to-date 1.4.4* devices.
    If you don't want to work with barrels though, or just want to see how they're implemented, you can always copy out the source files packaged inside.
  • Barrels should work work on 1.x devices as well; I would start a new thread if you are having issues running apps built with them on up-to-date 1.x devices.
    If you don't want to work with barrels though, or just want to see how they're implemented, you can always copy out the source files packaged inside.


    1.X devices should run barrels...also the sim? I treid to import the barrel but when trying to run, i get the same error as ruperthawkes (Barrels are not supported by device).
    jim_m_58 suggested setting the minimum sdk version while running the sim to 2.4.X, but when i try to adjust the manifest file for the fr235 i get the error: Device 'fr235' does not support SDK version '2.4.0'.

    I'll try now to just copy the class from the barrel file and run that.
  • The 235 is a 1.x device, so you probably want to use 1.4.x instead of 1.3.x This is in "run Configuration" where you set the target, not in the manifest.
  • Barrels are not supported by all devices... the require vm support to work. All devices with ConnectIQ 2.4.x support should be fine. 1.x devices with support for 1.4.4 and later should work as well.

    Travis
  • Barrels are not supported by all devices... the require vm support to work. All devices with ConnectIQ 2.4.x support should be fine. 1.x devices with support for 1.4.4 and later should work as well.

    Travis


    An overview page in the documentation of all devices (and their Apac counterparts) that shows the latest supported released Connect Iq version would be a handy thing to have (amongst others to see which device has barrel support, but this extends to all other functions in the api).
    Maintaining this overview would be a bit of a maintenance hell though. Perhaps it could be a page that can automatically be generated from your build system?

  • An overview page in the documentation of all devices (and their Apac counterparts) that shows the latest supported released Connect Iq version would be a handy thing to have (amongst others to see which device has barrel support, but this extends to all other functions in the api).
    Maintaining this overview would be a bit of a maintenance hell though. Perhaps it could be a page that can automatically be generated from your build system?



    We could do something like this, but the problem we encounter is that device firmware release schedules don't always align with our SDK releases. Any distributed docs with this information could easily get out of sync with what's actually available on devices. I agree that this is information we should probably make available, though. Even I would like that kind of reference--it's tough to keep track sometimes! :) Perhaps a page on the developer site would be a better place for this.
  • You can let the community contribute by forking and creating pull requests, then all you need do is review and merge.
    There might be very active developers from time to time who will contribute.
  • If is some problem with first barrel file so try this one. I have compiled it again with the last SDK


    Hello there, thanks for sharing your code, but the file is not accessible for view or download. Can you please share it again? Thx!
  • Hello there, thanks for sharing your code, but the file is not accessible for view or download. Can you please share it again? Thx!


    You might have to login to view and download files. I did.