Constant build.time in Android SDK
What exactly does the constant "long Android. OS. Build. Time" mean?
I tested it on the device, but got a strange number. I don't know its meaning
stay http://developer.android.com/reference/android/os/Build.html There was no explanation
resolvent:
As @ commonsware correctly commented: This is the UNIX timestamp (in milliseconds) generated by the device's ROM
If you delve into the source code of the build class, you will find the following:
// The following properties only make sense for internal engineering builds.
public static final long TIME = getLong("ro.build.date.utc") * 1000;
In other words, this value is only read from the ro.build.date.utc system attribute, which is part of the build.prop of ROM, and this attribute is generated by buildinfo.sh
The more humane equivalent is ro.build.date, which contains a text date representation of the same value. For example, in build.prop, you may find:
ro.build.date=Tue Nov 6 13:10:27 CST 2012
ro.build.date.utc=1352229027
There is no constant associated with it in Android's public API, but you can easily retrieve it by calling SystemProperties. Get ("ro. Build. Date")
Having said that, unless you are a specific ROM developer and / or ROM developer, you don't actually have to care about these values, as the comments in the first code snippet point out