Siemens CX70 Emoty User Manual Page 21

  • Download
  • Add to my manuals
  • Print
  • Page
    / 54
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 20
Writing NDEF Messages
21
void writeUrlToTag(Intent intent, String url)
throws IOException, FormatException {
String action = intent.getAction();
if (NfcAdapter.ACTION_NDEF_DISCOVERED.equals(action)) {
Tag tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);
Ndef ndefTag = Ndef.get(tag);
NdefRecord rec = NdefRecordRtdUri.createRtdUriRecord(url);
NdefMessage msg = new NdefMessage(new NdefRecord[] { rec });
ndefTag.connect();
ndefTag.writeNdefMessage(msg);
ndefTag.close();
}
}
Page view 20
1 ... 20 21 22 ... 54

Comments to this Manuals

No comments