Sync phone time with LitBit over Bluetooth
PatHock opened this issue · comments
PatHock commented
End goal
- Send current Date and time info to the LitBit over Bluetooth
- Implement a manual method of syncing time
- Potentially make this action automatic - it could happen for each bluetooth transaction, or once an hour, for example.
- Current date and time could be displayed in the app. This is optional.
Relevant Info/Links
https://docs.flutter.io/flutter/dart-core/DateTime-class.html
When the DateTime object is created, it reflects the current time, date, time zone etc of the mobile device. This object should be reset each time the date and time are sent over Bluetooth, to reflect the current time zone.
Your Code
Using the DateTime library linked above,
var now = new DateTime.now();