- Home /
How do you access the "Auto Time" or "Network-Based Time" on Android?
Hi,
I was wondering how you would access a Android mobile device's Automatic Time in the time settings within Unity? I would need to check that the time is automatic (or internet based) to ensure players don't change the day date to receive an item more than once per day. (I have items given out once every 24 hours for playing)
I can't seem to find any documentation on this. I'm writing in JS. If anyone has any info or references it would be great. All I can find is the info below but I can't seem to ind out how to make it work in Unity, or if it's even possible. I'm sure a LOT of people could find this useful.
Accessing Automatic Time on Android
Thanks in advance.
Answer by haim96 · Dec 17, 2013 at 07:32 PM
so you want to avoid "candy crush" syndrome in your game... ha? :) it a tricky question, to really solve it you need to check time with online server but you need to consider time zone shifting or to check UTC which should be the same all over the world.
i found this link, didn't check it but you might find it useful...
http://stackoverflow.com/questions/516788/getting-current-gmt-time
I can't seem to find anything on there that works. Is it possible to grab a value from a website? How else can grabbing server time be achieved?
Your answer
Follow this Question
Related Questions
Count time when the game is not running (mobile device)? 2 Answers
putting the date into a variable 1 Answer
Access the system time on mobile 1 Answer
Time and float? 2 Answers
Unity2D Day and Night Cycle 0 Answers