In m,y android application i would like to use time which do not come from device but a standard time that the user cannot change. Is there any way to do this.
Please share your valuable suggestions.
Thanks in advance:)
In m,y android application i would like to use time which do not come from device but a standard time that the user cannot change. Is there any way to do this.
Please share your valuable suggestions.
Thanks in advance:)
I'm unclear on the question here. The time on the phone in almost all (maybe all?) cases will be from the network, which will be the official time. If you need it in a different time zone that shouldn't be a difficult conversion.
If you don't mind the overhead, you could make a request to a time server for the official time. I'm sure there's one out there somewhere that accepts JSON or webservice requests.
This will give you the current time:
System.currentTimeMillis();