I create an android app and in this app, users can save some tasks. Those tasks are saved in device and when user go online, tasks will be sync to server.
I need to know the correct date and time when user save the task. Codes like Calendar.getInstance()
or new Date()
return device time and if device time was not correct, task save with wrong date. It's important for this app to work offline. And Because of bushiness of this app, It is possible that user change device time in purpose.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…