Skip to content

Instantly share code, notes, and snippets.

@codeswimmer
Created March 10, 2011 01:40
Show Gist options
  • Select an option

  • Save codeswimmer/863417 to your computer and use it in GitHub Desktop.

Select an option

Save codeswimmer/863417 to your computer and use it in GitHub Desktop.
Android: get a device's serial number
public static String getDeviceSerialNumber(Context context) {
TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
return telephonyManager.getDeviceId();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment