Skip to content

Instantly share code, notes, and snippets.

@miguelcardo
Created December 22, 2014 16:37
Show Gist options
  • Save miguelcardo/c2db1edfbc76942f4317 to your computer and use it in GitHub Desktop.
Save miguelcardo/c2db1edfbc76942f4317 to your computer and use it in GitHub Desktop.
Get hold of an NFC card
public static IsoDep getIsoTag(Intent intent) {
Tag tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);
if(tag != null) {
return IsoDep.get(tag);
} else {
return null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment