Revise common_appcontrol_n.html according to 2.3.2
authorByungWoo Lee <bw1212.lee@samsung.com>
Mon, 29 Aug 2016 07:29:36 +0000 (16:29 +0900)
committerByungWoo Lee <bw1212.lee@samsung.com>
Mon, 29 Aug 2016 07:29:36 +0000 (16:29 +0900)
Change-Id: I37ec670cab35296d6b2a6ae70981494d2a370866

org.tizen.guides/html/native/app_management/common_appcontrol_n.htm

index 25620b8..316a209 100644 (file)
@@ -60,8 +60,9 @@
 <div id="container"><div id="contents"><div class="content">
 <h1>Common Application Controls</h1> 
 
-<p>An application control provides functions for launching other applications with a specific operation, URI, MIME type, and extra data. The requesting application can get a result back from the launched application.</p>
-<p>This topic introduces the common application controls that you can use.</p>
+<p>An application control provides functions for launching other applications with a specific operation, URI, MIME type, and extra data. The requesting application can get a result back from the launched application. This topic introduces the common application controls that you can use. </p>
+
+<p>Most of the common application controls are supported in mobile applications; however, the Input Delegator is only supported in wearable applications. In Tizen 2.3.2, the Map and Input Delegator are only supported.</p>
 
     <table class="note"> 
      <tbody> 
@@ -152,7 +153,7 @@ app_control_send_launch_request(app_control, NULL, NULL);
 app_control_destroy(app_control);
 </pre>
 
-<h2 id="calendar" name="calendar">Calendar in Mobile Applications</h2>
+<h2 id="calendar" name="calendar">Calendar</h2>
 
 <h3>Adding a Calendar Event</h3>
 
@@ -1335,7 +1336,7 @@ app_control_destroy(service);
                <tbody>
                        <tr>
                                <th>Key</th>
-                               <th>Value Description</th>   
+                               <th>Value description</th>   
                        </tr>
                        <tr>
                                <td><span style="font-family: Courier New,Courier,monospace">APP_CONTROL_DATA_SELECTED</span></td>
@@ -1383,16 +1384,16 @@ app_control_destroy(app_control);
 
 <h2 id="map" name="map">Map</h2>
 
-<table class="note">
- <tbody> 
-  <tr> 
-   <th class="note">Note</th> 
-  </tr> 
-  <tr> 
-   <td class="note">The map application control is available in wearable applications since Tizen 2.3.2.</td> 
-  </tr> 
- </tbody> 
-</table>
+    <table class="note">
    <tbody> 
+      <tr> 
+       <th class="note">Note</th> 
+      </tr> 
+      <tr> 
+       <td class="note">In wearable applications, this application control is available since Tizen 2.3.2.</td> 
+      </tr> 
    </tbody> 
+    </table>
 
 <h3>Showing a Location on a Map</h3>
 
@@ -1475,7 +1476,7 @@ show_maps_operation(void)
                        <tr>
                                <td><span style="font-family: Courier New,Courier,monospace">APP_CONTROL_DATA_TYPE</span></td>
                                <td>The type of items to be delivered. Available values are <span style="font-family: Courier New,Courier,monospace">address</span> (default), <span style="font-family: Courier New,Courier,monospace">image</span>, <span style="font-family: Courier New,Courier,monospace">poi</span>, or <span style="font-family: Courier New,Courier,monospace">all</span>. This key must be passed as a string.</td>
-                               <td>This key is optional and the <span style="font-family: Courier New,Courier,monospace">poi</span> value is not supported in Tizen 2.4.</td>
+                               <td>This key is optional. <strong>The poi value is not supported in Tizen 2.4.</strong></td>
                        </tr>
                </tbody>
        </table>
@@ -1496,7 +1497,7 @@ show_maps_operation(void)
                        <tr>
                                <td><span style="font-family: Courier New,Courier,monospace">APP_CONTROL_DATA_NAME</span></td>
                                <td>The name of the selected location. This key must be passed as a string.</td>
-                               <td>This key is not supported in Tizen 2.4.</td>
+                               <td><strong>This key is not supported in Tizen 2.4.</strong></td>
                        </tr>
                        <tr>
                                <td><span style="font-family: Courier New,Courier,monospace">APP_CONTROL_DATA_PATH</span></td>
@@ -1947,7 +1948,7 @@ view_image_operation(const char* image_uri)
                <tbody>
                        <tr>
                                <th>Key</th>
-                               <th>Value Description</th>                              
+                               <th>Value description</th>                              
                        </tr>
                        <tr>
                                <td><span style="font-family: Courier New,Courier,monospace">APP_CONTROL_DATA_SELECTED</span></td>
@@ -2317,7 +2318,7 @@ wifi_launch_operation(void)
                <tbody>
                        <tr>
                                <th>Key</th>
-                               <th>Value Description</th>
+                               <th>Value description</th>
                        </tr>                   
                        <tr>
                                <td><span style="font-family: Courier New,Courier,monospace">APP_CONTROL_DATA_SELECTED</span></td>
@@ -2340,97 +2341,117 @@ app_control_send_launch_request(service, NULL, NULL);
 </pre>
 
 
-<h2 id="inputdelegator" name="inputdelegator">Input Delegator (in wearable only)</h2>
-<table class="note">
- <tbody> 
-  <tr> 
-   <th class="note">Note</th> 
-  </tr> 
-  <tr> 
-   <td class="note">Input Delegator is avaialbe in Tizen 2.3.2 and higher.</td> 
-  </tr> 
- </tbody> 
-</table>
-<h3>Input Delegator</h3>
-<p>To select the type of input method to receive input from user, use the <span style="font-family: Courier New,Courier,monospace">APP_CONTROL_OPERATION_GET_INPUT</span> operation. To give an option for Input Delegator, refer to the extras defined below.</p>
-<p>This app_control is ONLY supported to wearable profile.</p>
-<p align="center"><img src="../../images/common_appcontrol_inputdelegator.png" alt="Showing Input Delegator" /> <img src="../../images/common_appcontrol_inputdelegator_voice.png" alt="Showing Input Delegator" /></p>
-<p class="figure">Figure: Showing Input Delegator</p>
+<h2 id="inputdelegator" name="inputdelegator">Input Delegator</h2>
+
+    <table class="note">
+     <tbody> 
+      <tr> 
+       <th class="note">Note</th> 
+      </tr> 
+      <tr> 
+       <td class="note">This application control is only supported in wearable applictions, and available since Tizen 2.3.2.</td> 
+      </tr> 
+     </tbody> 
+    </table>
+
+<h3>Receiving User Input</h3>
+
+<p>To receive specific type of input from the user, use the <span style="font-family: Courier New,Courier,monospace">APP_CONTROL_OPERATION_GET_INPUT</span> operation. To give an option for the input delegator, refer to the extras defined below.</p>
+
+<p class="figure">Figure: Receiving user input</p>
+<p align="center"><img src="../../images/common_appcontrol_inputdelegator.png" alt="Receiving user input" /> <img src="../../images/common_appcontrol_inputdelegator_voice.png" alt="Receiving user input" /></p>
+
+
 <h4>Operation</h4>
-<ul><li><span style="font-family: Courier New,Courier,monospace">http://tizen.org/appcontrol/operation/get_input</span> (in <span style="font-family: Courier New,Courier,monospace">.c</span> files and manifest file)</li>
-<li><span style="font-family: Courier New,Courier,monospace">APP_CONTROL_OPERATION_GET_INPUT</span> (in <span style="font-family: Courier New,Courier,monospace">.c</span> files only)</li></ul>
+<ul>
+<li><span style="font-family: Courier New,Courier,monospace">http://tizen.org/appcontrol/operation/get_input</span> (in <span style="font-family: Courier New,Courier,monospace">.c</span> files and manifest file)</li>
+<li><span style="font-family: Courier New,Courier,monospace">APP_CONTROL_OPERATION_GET_INPUT</span> (in <span style="font-family: Courier New,Courier,monospace">.c</span> files only)</li>
+</ul>
 <h4>MIME Type (Mandatory)</h4>
-       <p>text/plain</p>
+<ul>
+<li>
+       <p><span style="font-family: Courier New,Courier,monospace">text/plain</span></p>
+</li>
+</ul>
 <h4>Extra Input</h4>
        <table>
                <tbody>
                        <tr>
-                               <th>Key</th>
+                              <th>Key</th>
                                <th>Description</th>
                                <th>Note</th>
                        </tr>
                        <tr>
                                <td><span style="font-family: Courier New,Courier,monospace">APP_CONTROL_DATA_INPUT_TYPE</span></td>
-                               <td>Select the type of input method. This key must be passed as a string.
-                                                          <p> - input_voice : Launch input method with voice type</p>
-                                                          <p> - input_emoticon : Launch input method with emoticon type</p>
-                                                          <p> - input_keyboard : Launch input method with keyboard type</p>
+                               <td>The input method type. This key must be passed as a string. Available values are:
+                                                          <ul>
+                                                          <li><span style="font-family: Courier New,Courier,monospace">input_voice</span>: Ask for voice input</li>
+                                                          <li><span style="font-family: Courier New,Courier,monospace">input_emoticon</span>: Ask for emoticon input</li>
+                                                          <li><span style="font-family: Courier New,Courier,monospace">input_keyboard</span>: Ask for keyboard input</li>
+                                                          </ul>
                                                           </td>
-                               <td>This key is optional.</td>
+                               <td rowspan="4">This key is optional.</td>
                        </tr>
                        <tr>
                                <td><span style="font-family: Courier New,Courier,monospace">APP_CONTROL_DATA_INPUT_DEFAULT_TEXT</span></td>
-                               <td>Send the pre inputted text such as "http://" in web. This key must be passed as a string.</td>
-                               <td>This key is optional.</td>
+                               <td>The preformatted text to be used as default input, such as &quot;http://&quot; for Web addresses. This key must be passed as a string.</td>
                        </tr>
-                       <tr>
+                      <tr>
                                <td><span style="font-family: Courier New,Courier,monospace">APP_CONTROL_DATA_INPUT_GUIDE_TEXT</span></td>
-                               <td>Send guide text to show to user such as "Input user name". This key must be passed as a string.</td>
-                               <td>This key is optional.</td>
-                       </tr>
+                               <td>The guide text, such as &quot;Input user name&quot;. This key must be passed as a string.</td>
+                      </tr>
                        <tr>
                                <td><span style="font-family: Courier New,Courier,monospace">APP_CONTROL_DATA_INPUT_PREDICTION_HINT</span></td>
-                               <td>Send text to receive answer result from smart reply. This key must be passed as a string.</td>
-                               <td>This key is optional.</td>
+                               <td>The text to receive an answer result from a smart reply. This key must be passed as a string.</td>
                        </tr>
                </tbody>
        </table>
+
 <h4>Extra Output</h4>
      <table>
                <tbody>
                        <tr>
                                <th>Key</th>
-                               <th>Value Description</th>
+                               <th>Value description</th>
                        </tr>
                        <tr>
                                <td><span style="font-family: Courier New,Courier,monospace">APP_CONTROL_DATA_TEXT</span></td>
-                               <td>The result string from Input delegator. This key must be passed as a string.</td>
+                               <td>The result string from the input delegator. This key must be passed as a string.</td>
                        </tr>
                </tbody>
        </table>
 <h4>Example Code</h4>
 <pre class="prettyprint">
 #include &lt;app_control.h&gt;
-void call_control() {
-    app_control_h service;
-    app_control_create(&service);
-    app_control_set_operation(service, APP_CONTROL_OPERATION_GET_INPUT);
-    app_control_set_mime(service, "plain/text");
-    app_control_add_extra_data(service, APP_CONTROL_DATA_INPUT_TYPE, "input_voice");
-    app_control_set_launch_mode(service, APP_CONTROL_LAUNCH_MODE_GROUP);
-    app_control_send_launch_request(service, app_control_result, NULL);
-    app_control_destroy(service);
+
+void
+call_control()
+{
+&nbsp;&nbsp;&nbsp;&nbsp;app_control_h service;
+&nbsp;&nbsp;&nbsp;&nbsp;app_control_create(&amp;service);
+
+&nbsp;&nbsp;&nbsp;&nbsp;app_control_set_operation(service, APP_CONTROL_OPERATION_GET_INPUT);
+&nbsp;&nbsp;&nbsp;&nbsp;app_control_set_mime(service, &quot;text/plain&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;app_control_add_extra_data(service, APP_CONTROL_DATA_INPUT_TYPE, &quot;input_voice&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;app_control_set_launch_mode(service, APP_CONTROL_LAUNCH_MODE_GROUP);
+
+&nbsp;&nbsp;&nbsp;&nbsp;app_control_send_launch_request(service, app_control_result, NULL);
+&nbsp;&nbsp;&nbsp;&nbsp;app_control_destroy(service);
 }
-static void app_control_result (app_control_h request, app_control_h reply, app_control_result_e result, void *user_data) {
-    char *value;
-    if (result == APP_CONTROL_RESULT_SUCCEEDED) {
-        int ret = app_control_get_extra_data(reply, APP_CONTROL_DATA_TEXT, &value);
-        if (ret == APP_CONTROL_ERROR_NONE) {
-            //  value is result string
-        }
-    }
+
+static void
+app_control_result(app_control_h request, app_control_h reply, app_control_result_e result, void *user_data) 
+{
+&nbsp;&nbsp;&nbsp;&nbsp;char *value;
+&nbsp;&nbsp;&nbsp;&nbsp;if (result == APP_CONTROL_RESULT_SUCCEEDED) {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int ret = app_control_get_extra_data(reply, APP_CONTROL_DATA_TEXT, &amp;value);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (ret == APP_CONTROL_ERROR_NONE) {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*  Value is the result string */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;}
 }
 </pre>
+
 <script type="text/javascript" src="../../scripts/jquery.zclip.min.js"></script>
 <script type="text/javascript" src="../../scripts/showhide.js"></script>
 </div></div></div>