Best code examples for Android NdefRecord class (android.nfc.NdefRecord)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android NdefRecord class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Android NdefRecord examples from Open Source projects
This code example shows how to use the following methods: getPayload, getTnf, getType
90:	Preconditions.checkArgument(record.getTnf() == NdefRecord.TNF_WELL_KNOWN); 
91:	Preconditions.checkArgument(Arrays.equals(record.getType(), NdefRecord.RTD_TEXT)); 
-
94:	byte[] payload = record.getPayload(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getPayload, getType
132:	Preconditions.checkArgument(Arrays.equals(record.getType(), NdefRecord.RTD_URI)); 
133:	byte[] payload = record.getPayload(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getPayload, getTnf, getType
60:	short tnf = handoverRequest.getTnf(); 
-
62:	!Arrays.equals(handoverRequest.getType(), NdefRecord.RTD_URI))) { 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getPayload, getTnf, getType
202:	int tnf = record.getTnf(); 
-
204:	return Uri.parse(new String(record.getType())); 
-
207:	Arrays.equals(NdefRecord.RTD_URI, record.getType())) { 
208:	byte[] payload = record.getPayload(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
92:	NdefRecord record = new NdefRecord(NdefRecord.TNF_MIME_MEDIA, 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getPayload, getType
133:	Preconditions.checkArgument(Arrays.equals(record.getType(), NdefRecord.RTD_URI)); 
134:	byte[] payload = record.getPayload(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getPayload, getTnf, getType
18:	Preconditions.checkNotNull(ndefRecord); 
-
20:	short tnf = ndefRecord.getTnf(); 
-
24:	String type = new String(ndefRecord.getType(), Charset.forName("UTF-8")); 
25:	byte[] payload = ndefRecord.getPayload(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getPayload, getTnf, getType
71:	return false; 
72:	} 
73:	} 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getPayload, getTnf, getType
68:	Preconditions.checkNotNull(ndefRecord); 
69:	Preconditions.checkArgument(ndefRecord.getTnf() == NdefRecord.TNF_WELL_KNOWN); 
70:	Preconditions.checkArgument(Arrays.equals(ndefRecord.getType(), NdefRecord.RTD_TEXT)); 
-
73:	byte[] payload = ndefRecord.getPayload(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getPayload, getTnf, getType
71:	Preconditions.checkArgument(record.getTnf() == NdefRecord.TNF_MIME_MEDIA); 
72:	String type = new String(record.getType(), Charset.forName("US-ASCII")); 
73:	byte[] payload = record.getPayload(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
76:	NdefRecord rec = new NdefRecord(NdefRecord.TNF_ABSOLUTE_URI, NdefRecord.RTD_URI, 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getPayload, getType
75:	new String(mimeRecord.getType()))) { 
-
78:	Uri.parse(new String(mimeRecord.getPayload()))); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getId, getTnf, getType, toByteArray
83:	byte[] byteArray = record.toByteArray(); 
84:	byte[] id = record.getId(); 
85:	short tnf = record.getTnf(); 
86:	byte[] type = record.getType(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getPayload, getTnf, getType
66:	Preconditions.checkArgument(record.getTnf() == NdefRecord.TNF_WELL_KNOWN); 
67:	Preconditions.checkArgument(Arrays.equals(record.getType(), NdefRecord.RTD_TEXT)); 
-
69:	byte[] payload = record.getPayload(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
76:	NdefRecord rec = new NdefRecord(NdefRecord.TNF_ABSOLUTE_URI, NdefRecord.RTD_URI, 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
182:	NdefRecord rec = new NdefRecord(NdefRecord.TNF_WELL_KNOWN, NdefRecord.RTD_URI, 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getPayload, getType
128:	new String(mimeRecord.getType()))) { 
-
131:	Uri.parse(new String(mimeRecord.getPayload()))); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getPayload, getTnf, getType
71:	Preconditions.checkArgument(record.getTnf() == NdefRecord.TNF_MIME_MEDIA); 
72:	String type = new String(record.getType(), Charset.forName("US-ASCII")); 
73:	byte[] payload = record.getPayload(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getPayload
205:	byte action = record.getPayload()[0]; 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getPayload, getTnf, getType
41:	Preconditions.checkArgument(record.getTnf() == NdefRecord.TNF_WELL_KNOWN); 
42:	Preconditions.checkArgument(Arrays.equals(record.getType(), NdefRecord.RTD_TEXT)); 
-
44:	byte[] payload = record.getPayload(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getPayload, getTnf
132:	Preconditions.checkNotNull(ndefRecord); 
-
134:	short tnf = ndefRecord.getTnf(); 
-
137:	byte[] payload = ndefRecord.getPayload(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods:
96:	return new NdefRecord(NdefRecord.TNF_WELL_KNOWN, NdefRecord.RTD_TEXT, new byte[0], data); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getPayload, getType
129:	Preconditions.checkArgument(Arrays.equals(record.getType(), NdefRecord.RTD_URI)); 
130:	byte[] payload = record.getPayload(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getPayload, getTnf, getType
71:	return false; 
72:	} 
73:	} 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
256:	return new NdefRecord(NdefRecord.TNF_WELL_KNOWN, NdefRecord.RTD_TEXT, new byte[0], data); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getPayload, getTnf, getType
81:	Preconditions.checkArgument(record.getTnf() == NdefRecord.TNF_WELL_KNOWN); 
82:	Preconditions.checkArgument(Arrays.equals(record.getType(), NdefRecord.RTD_TEXT)); 
-
84:	byte[] payload = record.getPayload(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getPayload, getTnf, getType
99:	short tnf = record.getTnf(); 
-
110:	byte[] payload = record.getPayload(); 
-
117:	Preconditions.checkArgument(Arrays.equals(record.getType(), NdefRecord.RTD_URI)); 
118:	byte[] payload = record.getPayload(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getPayload, getType
35:	String contentType = new String(record.getType(), Charset.forName("US_ASCII")); 
-
37:	return NfaRecordFactory.ndefRecords().mimeRecordInstance(contentType, record.getPayload()); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getPayload, getType
75:	new String(mimeRecord.getType()))) { 
-
78:	Uri.parse(new String(mimeRecord.getPayload()))); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getPayload, getTnf, getType
49:	Preconditions.checkArgument(record.getTnf() == NdefRecord.TNF_WELL_KNOWN); 
50:	Preconditions.checkArgument(Arrays.equals(record.getType(), NdefRecord.RTD_TEXT)); 
-
52:	byte[] payload = record.getPayload(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getPayload, getTnf, getType
116:	byte[] payload = record.getPayload(); 
-
118:	if(record.getTnf() == NdefRecord.TNF_WELL_KNOWN){ 
119:	if(Arrays.equals(record.getType(), NdefRecord.RTD_TEXT)){ 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getPayload, getTnf, getType
65:	Preconditions.checkArgument(record.getTnf() == NdefRecord.TNF_WELL_KNOWN); 
66:	Preconditions.checkArgument(Arrays.equals(record.getType(), NdefRecord.RTD_TEXT)); 
-
68:	byte[] payload = record.getPayload(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getPayload, getTnf, getType
68:	short tnf = record.getTnf(); 
-
79:	byte[] payload = record.getPayload(); 
-
86:	Preconditions.checkArgument(Arrays.equals(record.getType(), NdefRecord.RTD_URI)); 
87:	byte[] payload = record.getPayload(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getPayload, getTnf, getType
96:	if (noteRecord.getTnf() != NdefRecord.TNF_MIME_MEDIA 
97:	|| !("text/plain".equals(new String(noteRecord.getType()))) ) { 
-
102:	String payload = new String(noteRecord.getPayload(), Charset.forName("US-ASCII")); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getId, getTnf
148:	short tnf = ndefRecord.getTnf(); 
-
153:	record = EmptyRecord.parse(ndefRecord); 
-
163:	record = MimeRecord.parse(ndefRecord); 
-
168:	record = AbsoluteUriRecord.parse(ndefRecord); 
-
173:	record = ExternalTypeRecord.parse(ndefRecord); 
-
178:	record = UnknownRecord.parse(ndefRecord); 
-
191:	record = UnsupportedRecord.parse(ndefRecord); 
-
194:	if(ndefRecord.getId().length > 0) { 
195:	record.setId(ndefRecord.getId()); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods:
92:	NdefRecord record = new NdefRecord(NdefRecord.TNF_WELL_KNOWN, 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getPayload, getTnf, getType
99:	if (record.getTnf() != NdefRecord.TNF_WELL_KNOWN) { 
-
101:	} else if (Arrays.equals(record.getType(), NdefRecord.RTD_TEXT)) { 
-
104:	byte[] payload = record.getPayload(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods:
93:	NdefRecord textRecord = new NdefRecord(NdefRecord.TNF_MIME_MEDIA, mimeType.getBytes(), 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getPayload, getTnf, getType
202:	int tnf = record.getTnf(); 
-
204:	return Uri.parse(new String(record.getType())); 
-
207:	Arrays.equals(NdefRecord.RTD_URI, record.getType())) { 
208:	byte[] payload = record.getPayload(); 
Full Snippet Info
5
CodeRank
Related Android NdefRecord Questions & Answers:
See Code Examples for Android NdefRecord Methods: