NFC module rewritten to comply with task #914
authorAdam Szczerbiak <a.szczerbiak@samsung.com>
Tue, 5 Jan 2016 10:44:27 +0000 (11:44 +0100)
committera.szczerbiak <a.szczerbiak@samsung.com>
Thu, 7 Jan 2016 12:48:23 +0000 (21:48 +0900)
Change-Id: Ie73a5b3f85062f2855873d1ee21d1eaf31940258
Signed-off-by: Adam Szczerbiak <a.szczerbiak@samsung.com>
org.tizen.web.apireference/html/device_api/mobile/tizen/nfc.html

index 4d038a8..6ea770f 100644 (file)
@@ -2839,6 +2839,16 @@ The NDEFMessage must have at least one NDEFRecord.
  1.0
             </p>
 </li>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+// prepare two NDEFRecords:
+var myRecordURI = new tizen.NDEFRecordURI("https://www.tizen.org/");
+var myRecordTextPlain = new tizen.NDEFRecordMedia("text/plain", [116, 105, 122, 101, 110]);
+
+// create a NDEFMessage composed of two NDEFRecords:
+var myMessage = new NDEFMessage([myRecordURI, myRecordTextPlain]);
+</pre>
+</div>
 </ul>
 </div>
 <div class="methods">
@@ -3000,10 +3010,9 @@ The byte array contains <var>0</var> to <var>(2 ** 32 - 1)</var> bytes.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates a new NDEF record.
- var newRecord = new tizen.NDEFRecordURI("https://www.tizen.org/");
- var payload = newRecord.payload;
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+  var newRecord = new tizen.NDEFRecord(2, [42, 84], [1, 2, 3, 4]);
+</pre>
 </div>
 </li>
 </ul>
@@ -3064,6 +3073,11 @@ The byte array contains <var>0</var> to <var>(2 ** 32 - 1)</var> bytes.
  1.0
             </p>
 </li>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+  var newRecord = new tizen.NDEFRecordText("Tizen", "en-US", "UTF8");
+</pre>
+</div>
 </ul>
 </div>
 </div>
@@ -3080,7 +3094,6 @@ The byte array contains <var>0</var> to <var>(2 ** 32 - 1)</var> bytes.
             Since: </span>
  1.0
           </p>
-        
       <div class="constructors">
 <h4 id="NDEFRecordURI::constructor">Constructors</h4>
 <dl><pre class="webidl prettyprint">NDEFRecordURI(DOMString uri);</pre></dl>
@@ -3096,7 +3109,15 @@ The byte array contains <var>0</var> to <var>(2 ** 32 - 1)</var> bytes.
             Since: </span>
  1.0
             </p>
-</li></ul>
+</li>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+// Creates a new NDEF record.
+var newRecord = new tizen.NDEFRecordURI("https://www.tizen.org/");
+var payload = newRecord.payload;
+</pre>
+</div>
+</ul>
 </div>
 </div>
 <div class="interface" id="NDEFRecordMedia">
@@ -3136,7 +3157,14 @@ The byte array contains <var>0</var> to <var>(2 ** 32 - 1)</var> bytes.
             Since: </span>
  1.0
             </p>
-</li></ul>
+</li>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var myData = [116, 105, 122, 101, 110];
+var newRecord = new tizen.NDEFRecordMedia("text/plain", myData);
+</pre>
+</div>
+</ul>
 </div>
 </div>
 <div class="interface" id="HCEEventData">