My clockface works fine on iOS and Emulator, however, it is declined from publishing due to problems with data fetching on Android.
Have anyone such problems?
Can anyone suggest anything?
I feel kind of frustrated since I don't have any Android to test the clockface on.
Answered! Go to the Best Answer.
Best AnswerAlright. If someone will stumble upon this, here's the reason: .fetch on Android isn't support requests through http. So, https only.
Fitbit guys, I believe this is valuable information in API reference.
Best AnswerI think the companion simulator is based on Android. You can test your fetches with it and see what's happening.
Best AnswerCould you please specify, what kind of simulator you referring to?
If you mean Fitbit Simulator then I'm afraid it's not based on Android. Work too fast for that. I believe it is based on webviews. Anyway, my clockface works like a charm on it.
Best AnswerIf it's not working with the Fitbit simulator I don't have any ideas for the moment.
Best AnswerIt IS works on Fitbit Simulator.
It IS works on an iOS app.
It DOES NOT work with an Android app, and I don't have an Android to test it.
Best AnswerDo some tests in the simulator and make sure your data is always fetched / retry on failure.
Hand the unpublished link out here/discord asking for android testers.
Fitbit communications is spotty at best; so maybe add the option to manually force the update.
Finally with the complete un-reliability if everything looks good without changes, make a minor edit (like add an extra carriage return) and resubmit.
Best AnswerThanks for suggestions.
If anyone willing to help, try this one, please.
Steps to reproduce: in the settings, choose Weather for any enabled notch.
Expected: weather temperature appears on the clockface.
If it isn't, please drop here some screenshots of console output.
Thanks!
Best AnswerI tried testing it, I think you don't catch the value changed in settings on android. Are you doing
settingsStorage.onchange = function(evt) {} &&
if (
me.launchReasons.settingsChanged &&
(settingsStorage.getItem("additive") !== "undefined" ||
settingsStorage.getItem("additive") !== undefined) &&
settingsStorage.getItem("additive")
) {
}? I think you are not triggering the fetch when the settings are changed.
Best AnswerI'm looking right now, you should catch the change in the settings in my opinion to see if topNotchInfo for example was changed and trigger your code.
Best AnswerThe code is running one time when the companion is triggered, but you need your code sequence to be triggered when the settings key is change, not before that. Hope it helps you, I don't really know how to explain it better. 😞
Best AnswerAlright. If someone will stumble upon this, here's the reason: .fetch on Android isn't support requests through http. So, https only.
Fitbit guys, I believe this is valuable information in API reference.
Best Answer