WebAPI/WebNFC: Difference between revisions

Jump to navigation Jump to search
Line 244: Line 244:
   
   
  Sample example to demonstrate the construction of an url as an NDEF Message:
  Sample example to demonstrate the construction of an url as an NDEF Message:
   ''var tnf    = NDEF.TNF_WELL_KNOWN;
   var tnf    = NDEF.TNF_WELL_KNOWN;
   var type    = NDEF.RTD_URI;
   var type    = NDEF.RTD_URI;
   var id      = new Uint8Array();
   var id      = new Uint8Array();
Line 251: Line 251:
   var  urlNDEF = new MozNDEFRecord(tnf, type, id, payload);
   var  urlNDEF = new MozNDEFRecord(tnf, type, id, payload);
   
   
   // Call writeNdef() API with urlNDEF''
   // Call writeNdef() API with urlNDEF


== NDEF Connect Example ==
== NDEF Connect Example ==
Confirmed users
118

edits

Navigation menu