Hello There,
I am working with Datafields, and I am wondering if its possible to swap the background color based on the night/day mode?
If yes, please could you provide some examples about it?
Thanks in advance.
Hello There,
I am working with Datafields, and I am wondering if its possible to swap the background color based on the night/day mode?
If yes, please could you provide some examples about it?
Thanks in advance.
if you're talking abot change at sunrise and at sunset, on most devices you have to calculate that yourself in the DF. With system 5, you can use Weather.getSunrise() and Weather.getSunset().
When you have this info, it really depends on how you coded your DF to change the colors,
In a simple DF, your DF should act like the native ones for that device in this regard
I am using an EDGE 830, and I want to confirm if the datafields background that come originally in this devices depends on a light sensor? or how does the night/day mode work in this device?
Not sure. Start an activity a while befor sunset and see hoe it looks a while after sunset using native data fields.
if you're talking abot change at sunrise and at sunset, on most devices you have to calculate that yourself in the DF. With system 5, you can use Weather.getSunrise() and Weather.getSunset().
Do these functions use the internet? If they do, it would be kind of "expensive" for such a basic need.
am using an EDGE 830, and I want to confirm if the datafields background that come originally in this devices depends on a light sensor? or how does the night/day mode work in this device?
It's time based. It doesn't use a light sensor.
It uses the garmin Weather stuff. You really only need to call them once when a DF is loaded and not every time onUpdate is called.
It uses the garmin Weather stuff.
That means "internet stuff" (generally) and having Garmin Connect Mobile running and connected.
The devices can calculate sunrise/sunset internally. Hopefully, the "weather stuff" uses that but I'm not sure it does.
If "internet stuff" is required, one might not want that complication just to change the background of a data field. You might not want users to have issues with something they don't expect to require "internet stuff".
You only need to get rise and set once. I suspect the native stuff uses the same thing. You can calculate it yourself (I do that in watch faces) and only needed once a day, but takes code space.
I suspect the native stuff uses the same thing.
I have no idea why Garmin forces people to do the calculation for themselves.
The change in background, which is based on time (of sunset/sunrise), doesn't need the internet.
The sunrise/sunset shouldn't need the internet. But actual weather certainly does.
Maybe, Garmin just exposed the internal calculation in the weather module (I sure hope so).
Thanks jim