List of usage examples for android.nfc NdefRecord TNF_ABSOLUTE_URI
short TNF_ABSOLUTE_URI
To view the source code for android.nfc NdefRecord TNF_ABSOLUTE_URI.
Click Source Link
When creating new records prefer #createUri , since it offers more compact URI encoding ( #RTD_URI allows compression of common URI prefixes).
From source file:mobisocial.musubi.ui.FeedListActivity.java
public void writeGroupToTag(Uri uri) { NdefRecord urlRecord = new NdefRecord(NdefRecord.TNF_ABSOLUTE_URI, NdefRecord.RTD_URI, new byte[] {}, uri.toString().getBytes());// w w w . jav a 2 s .c o m NdefMessage ndef = new NdefMessage(new NdefRecord[] { urlRecord }); mNfc.enableTagWriteMode(ndef); Toast.makeText(this, "Touch a tag to write the group...", Toast.LENGTH_SHORT).show(); }