iphone - Ensuring correct date/time -
we creating location-enabled app users use app record events in field.
the important part of event data when event happened. no issue when user online, support situations when user offline (by remembering & later syncing events).
there situations when users offline , change time on phone, event times wrongly recorded.
so, best way ensure correct time, independent of user actions, given device offline. ideas:
- gps time. possible acquire it?
- tracking system time changes made user?
- any other idea?
note: time need second accuracy, approximately minute accuracy ok.
note2: creating mobile apps android , iphone, i'm interested generic solutions , solutions specific of 2 platforms.
i, personally, wouldn't worry scenario. liklihood of intentionally changing time on android (which periodically throughout day syncs time server automatically) while offline seems low me. being said, way see compensating keep service running in background keeps running tally of seconds passed since recording location data offline. once uploaded servers use elapsed seconds calculate time offset current utc time. it's awful lot go through, work.
gps time interesting idea, android allows users of sdk send mock locations devices. i'm not sure reliably track changes system time either, , if you'd capturing them after fact without current real time context.
Comments
Post a Comment