05-14-2018 03:31 - edited 05-14-2018 03:45
05-14-2018 03:31 - edited 05-14-2018 03:45
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.
05-14-2018 12:35 - edited 05-15-2018 14:13
05-14-2018 12:35 - edited 05-15-2018 14:13
Alright. 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.
05-14-2018 04:06
05-14-2018 04:06
You can test it on the companion simulator 😄
05-14-2018 04:07
05-14-2018 04:07
What does it mean?
Is it something different than Fitbit Simulator?
05-14-2018 04:20
05-14-2018 04:20
I think the companion simulator is based on Android. You can test your fetches with it and see what's happening.
05-14-2018 04:31 - edited 05-14-2018 04:32
05-14-2018 04:31 - edited 05-14-2018 04:32
Could 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.
05-14-2018 04:36 - edited 05-14-2018 04:37
05-14-2018 04:36 - edited 05-14-2018 04:37
If it's not working with the Fitbit simulator I don't have any ideas for the moment.
05-14-2018 04:41 - edited 05-14-2018 04:41
05-14-2018 04:41 - edited 05-14-2018 04:41
It 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.
05-14-2018 04:45
05-14-2018 04:45
Do 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.
05-14-2018 04:50
05-14-2018 04:50
Thanks 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!
05-14-2018 05:43
05-14-2018 05:43
I 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.
05-14-2018 05:47 - edited 05-14-2018 05:48
05-14-2018 05:47 - edited 05-14-2018 05:48
I believe I do.
Here's the source code of my companion section.
05-14-2018 06:11
05-14-2018 06:11
I'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.
05-14-2018 06:35
05-14-2018 06:35
EWR, I really appreciate your willingness to help, but how's that could help in my case?
05-14-2018 06:42
05-14-2018 06:42
The 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. 😞
05-14-2018 12:35 - edited 05-15-2018 14:13
05-14-2018 12:35 - edited 05-15-2018 14:13
Alright. 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.