Where and when is generated android.Build.SERIAL in AOSP? -
i know, android.build.serial generated @ first device boot, can't locate , when exactly. i'm building aosp jelly bean, android tablet, nosdcard.
2nd question: serial number really unique android devices?
according this thread, says it's unique, added since api 9 , may not present on devices.
if you're writing app specific device's model, direclty check if has imei. otherwise, said, recommend write custom id generator module.
you sure id unique , available devices.
imei represents serial number of device. it's sure it's unique. 2 different devices can't have same serial number.
to serial number of device have call :
string serial = build.serial; it exists approach. can id calling secure.android_id.
a 64-bit number (as hex string) randomly generated on device's first boot , should remain constant lifetime of device. (the value may change if factory reset performed on device.)
private final string android_id = secure.getstring(getcontext().getcontentresolver(), secure.android_id); take care because says value may change if factory reset performed.
Comments
Post a Comment