Created
July 19, 2012 06:50
-
-
Save masarugen/3141200 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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