Hello Garminers,
I have a watchface which gets the weather from my server every hour.
This is the code I have in my watchface Monkey C:
var device = System.getDeviceSettings();
var params = {
"access_token" => "token_string_here",
"checkin" => false,
"app" => {
"uuid" => "uuid_string_here",
"version" => "version_string_here"
},
"watch" => {
"brand" => "garmin",
"model" => device.partNumber,
"fw" => device.firmwareVersion,
"ciq" => device.monkeyVersion
}
};
On the server, this object is received correctly most of the time.
However, once in a while, the object is received by the server incomplete. In particular, the "app" object and the "fw" or "ciq" nested variables are incomplete.
When it breaks, this is an example of what my server will receive:
'{"access_token": "token_string_here","watch": {"brand": "garmin","model": "006-B4234-00","ciq": [5,2,0],"fw": [}},"checkin": false,"app": {}}'
Notice how in this example, "fw" cuts off after the opening bracket, and "app" also cuts off after its opening bracket.
I cannot figure out why this happens only sometimes, and would love to know if there's something I'm doing wrong that could help resolve this issue.
Thank you!