Skip to content

Instantly share code, notes, and snippets.

@masarugen
Created July 19, 2012 06:50
Show Gist options
  • Save masarugen/3141200 to your computer and use it in GitHub Desktop.
Save masarugen/3141200 to your computer and use it in GitHub Desktop.
/**
* IDmを取得する
* @param intent
* @return
*/
private String getIdm(Intent intent) {
String idm = null;
StringBuffer idmByte = new StringBuffer();
byte[] rawIdm = intent.getByteArrayExtra(NfcAdapter.EXTRA_ID);
if (rawIdm != null) {
for (int i = 0; i < rawIdm.length; i++) {
idmByte.append(Integer.toHexString(rawIdm[i] & 0xff));
}
idm = idmByte.toString();
}
return idm;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment