Code example for NdefRecord

Methods: getPayloadgetTnfgetType

        return mLanguageCode;
    // TODO: deal with text fields which span multiple NdefRecords 
    public static TextRecord parse(NdefRecord record) {
        Preconditions.checkArgument(record.getTnf() == NdefRecord.TNF_WELL_KNOWN);
        Preconditions.checkArgument(Arrays.equals(record.getType(), NdefRecord.RTD_TEXT));
        try { 
            byte[] payload = record.getPayload();
             * payload[0] contains the "Status Byte Encodings" field, per the 
             * NFC Forum "Text Record Type Definition" section 3.2.1. 
             * bit7 is the Text Encoding Field. 
             * if (Bit_7 == 0): The text is encoded in UTF-8 if (Bit_7 == 1): 
             * The text is encoded in UTF16 
             * Bit_6 is reserved for future use and must be set to zero. 
Stop searching for code, let great code find you!  Add Codota to your java IDE