02-12-2018 09:56
02-12-2018 09:56
I'm not new to programming but this SDK does have a bit of a learning curve. So what if I wanted to have an app that displays the date and time then you would input a number and save that data. I can do clock face stuff all day but how do you display the time and date in an app?
Answered! Go to the Best Answer.
02-12-2018 13:13
02-12-2018 13:13
Clocks and apps are essentially the same thing, but you can only have 1 clock installed and you can't use buttons in clocks.
You can use the javascript date object. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
You can use a tumbler to select a number. https://community.fitbit.com/t5/SDK-Development/Data-input-like-in-Timer-app/m-p/2256577
02-12-2018 13:13
02-12-2018 13:13
Clocks and apps are essentially the same thing, but you can only have 1 clock installed and you can't use buttons in clocks.
You can use the javascript date object. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
You can use a tumbler to select a number. https://community.fitbit.com/t5/SDK-Development/Data-input-like-in-Timer-app/m-p/2256577
02-12-2018 14:24
02-12-2018 14:24
Hi, sorry if this is a bit unrelated but I saw the reference to the JavaScript Date object and wanted to ask.
Would it be possible to use something like moment.js? I have tried putting it in the common folder and importing it, but without any luck.
BR, Niko.
02-12-2018 14:27
02-12-2018 14:27
wrote:Would it be possible to use something like moment.js? I have tried putting it in the common folder and importing it, but without any luck.
I think it would be too big for the device, we're resource constrained.