Reputation: 1621
how can i get serial number in API level 3?
Upvotes: 4
Views: 461
Reputation: 3852
Depending on what you want to do there is several options :
reading Settings.Secure.ANDROID_ID. "This is a 64-bit quantity that is generated and stored when the device first boots"
using TelephonyManager.getDeviceId() But it's not working on all devices.
More on the subject: http://android-developers.blogspot.com/2011/03/identifying-app-installations.html
Upvotes: 3
Reputation:
TelephonyManager manager = (TelephonyManager) yourActivity.getSystemService(Context.TELEPHONY_SERVICE);
String uid = manager.getDeviceId();
This is working since API level 1.
Upvotes: 2