Code example for NdefRecord

Methods: getPayloadgetType

0
	 * @see com.github.nfcforandroid.parser.ndef.NdefParser#parseNdef(android.nfc.NdefRecord) 
	 */ 
	@Override 
	public INfaRecord parseNdef(NdefRecord ndefRecord) {
 
		byte[] packageNameArray = ndefRecord.getPayload();
		if (packageNameArray.length == 0) {
			throw new ParserException(new IllegalArgumentException("Package name is empty"));
		} 
		byte[] typeArray = ndefRecord.getType();
		String type = new String(typeArray);
		if (!AndroidApplicationRecord.TYPE.equals(type)) {
			throw new ParserException(new IllegalArgumentException("Record is not an AndroidApplicationRecord"));
 
		} 
 
		return NfaRecordFactory.externalRecords().androidApplicationRecordInstance(new String(packageNameArray));
	} 
 
} 
Connect your IDE to all the code out there  Get Codota for Java