<li><a href="#contact">Contact</a></li>
<li><a href="#email">Email</a></li>
<li><a href="#file">File Storage</a></li>
+ <li><a href="#inputdelegator">Input Delegator</a></li>
<li><a href="#map">Map</a></li>
<li><a href="#message">Message</a></li>
<li><a href="#multimedia">Multimedia</a></li>
</li>
<li><a href="#voice">Voice Recorder</a></li>
<li><a href="#vpnservice">VPN Service</a></li>
- <li><a href="#inputdelegator">Input Delegator</a></li>
</ul>
<p class="toc-title">Related Info</p>
<ul class="toc">
<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>All the common application controls are supported in mobile applications, except for the Input Delegator. In Tizen 2.3.2 and higher, only the Map and Input Delegator are supported in wearable applications.</p>
+<p>All the common application controls are supported in mobile applications. The input delegator is supported in mobile applications since Tizen 4.0, with limited features. In wearable applications, only the map and input delegator application controls are supported.</p>
<div class="note">
app_control_destroy(app_control);
</pre>
+<h2 id="inputdelegator" name="inputdelegator">Input Delegator</h2>
+
+ <div class="note">
+ <strong>Note</strong>
+ The input delegator is supported in wearable applications since Tizen 2.3.2, and in mobile applications, with limited features, since Tizen 4.0.
+ </div>
+
+<h3>Receiving User Input</h3>
+
+<p>To receive a specific type of input from the user, use the <code>APP_CONTROL_OPERATION_GET_INPUT</code> operation. To give an option for the input delegator, refer to the extras defined below.</p>
+
+<p align="center"><strong>Figure: Receiving user input</strong></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><code>http://tizen.org/appcontrol/operation/get_input</code> (in <code>.c</code> files and manifest file)</li>
+<li><code>APP_CONTROL_OPERATION_GET_INPUT</code> (in <code>.c</code> files only)</li>
+</ul>
+<h4>MIME Type (Mandatory)</h4>
+<ul>
+<li><code>text/plain</code></li>
+<li><code>image/*</code></li>
+<li><code>audio/*</code></li>
+<li><code>*/*</code></li>
+</ul>
+<h4>Extra Input</h4>
+ <table>
+ <tbody>
+ <tr>
+ <th>Key</th>
+ <th>Description</th>
+ <th>Note</th>
+ </tr>
+ <tr>
+ <td><code>APP_CONTROL_DATA_INPUT_TYPE</code></td>
+ <td>The input method type. This key must be passed as a string. The available values are:
+ <ul>
+ <li><code>input_voice</code>: Ask for voice input</li>
+ <li><code>input_emoticon</code>: Ask for emoticon input</li>
+ <li><code>input_keyboard</code>: Ask for keyboard input</li>
+ <li><code>input_reply</code>: Ask for reply input</li>
+ <li><code>input_drawing</code>: Ask for drawing input</li>
+ <li><code>input_recording</code>: Ask for recording input</li>
+ </ul>
+ </td>
+ <td>This key is optional.
+ <p><strong>The <code>input_reply</code>, <code>input_drawing</code> and <code>input_recording</code> values are supported since Tizen 4.0, in wearable applications only.</strong></p></td>
+ </tr>
+ <tr>
+ <td><code>APP_CONTROL_DATA_INPUT_DEFAULT_TEXT</code></td>
+ <td>The preformatted text to be used as default input, such as "http://" for Web addresses. This key must be passed as a string.</td>
+ <td rowspan="3">This key is optional.</td>
+ </tr>
+ <tr>
+ <td><code>APP_CONTROL_DATA_INPUT_GUIDE_TEXT</code></td>
+ <td>The guide text, such as "Input user name". This key must be passed as a string.</td>
+ </tr>
+ <tr>
+ <td><code>APP_CONTROL_DATA_INPUT_PREDICTION_HINT</code></td>
+ <td>The text to receive an answer result from a smart reply. This key must be passed as a string.</td>
+ </tr>
+ <tr>
+ <td><code>APP_CONTROL_DATA_INPUT_RETURNKEY_TYPE</code></td>
+ <td>The return key used in the keyboard input type. This key must be passed as a string. The available values are:
+ <ul>
+ <li><code>Done</code>: Set key label to <strong>Done</strong></li>
+ <li><code>Send</code>: Set key label to <strong>Send</strong></li>
+ <li><code>Join</code>: Set key label to <strong>Join</strong></li>
+ <li><code>Login</code>: Set key label to <strong>Login</strong></li>
+ <li><code>Next</code>: Set key label to <strong>Next</strong></li>
+ <li><code>Sign-in</code>: Set key label to <strong>Sign-in</strong></li>
+ <li><code>Search</code>: Set key label to <strong>Search</strong></li>
+ <li><code>Go</code>: Set key label to <strong>Go</strong></li>
+ </ul>
+ </td>
+ <td rowspan="2">This key is optional, and <strong>it is supported since Tizen 4.0.</strong></td>
+ </tr>
+ <tr>
+ <td><code>APP_CONTROL_DATA_INPUT_MAX_TEXT_LENGTH</code></td>
+ <td>The maximum text length allowed in the keyboard input type. This key must be passed as a string.</td>
+ </tr>
+ <tr>
+ <td><code>APP_CONTROL_DATA_INPUT_REPLY_TYPE</code></td>
+ <td>The reply type. This key must be passed as a string. The available values are:
+ <ul>
+ <li><code>input_voice</code>: Receive the result as voice</li>
+ <li><code>input_emoticon</code>: Receive the result as an emoticon</li>
+ <li><code>input_keyboard</code>: Receive the result as keyboard input</li>
+ <li><code>input_reply</code>: Receive the result as reply input</li>
+ <li><code>input_image</code>: Receive the result as an image</li>
+ <li><code>input_audio</code>: Receive the result as audio</li>
+ </ul>
+ </td>
+ <td>This key is optional, and <strong>it is supported since Tizen 4.0, in wearable applications only.</strong></td>
+ </tr>
+ </tbody>
+ </table>
+
+<h4>Extra Output</h4>
+ <table>
+ <tbody>
+ <tr>
+ <th>Key</th>
+ <th>Value description</th>
+ <th>Note</th>
+ </tr>
+ <tr>
+ <td><code>APP_CONTROL_DATA_TEXT</code></td>
+ <td>The result string from the input delegator. This key must be passed as a string.</td>
+ <td>-</td>
+ </tr>
+ <tr>
+ <td><code>APP_CONTROL_DATA_PATH</code></td>
+ <td>The list of multiple file paths from the input delegator. This key must be passed as an array.</td>
+ <td><strong>This key is supported since Tizen 4.0, in wearable applications only.</strong></td>
+ </tr>
+ </tbody>
+ </table>
+<h4>Example Code</h4>
+<pre class="prettyprint">
+#include <app_control.h>
+
+void
+input_selector(void *data, Evas_Object *obj, void *event_info)
+{
+ app_control_h app_control;
+ app_control_create(&app_control);
+ app_control_set_operation(app_control, APP_CONTROL_OPERATION_GET_INPUT);
+ app_control_set_mime(app_control, "text/plain");
+ app_control_set_launch_mode(app_control, APP_CONTROL_LAUNCH_MODE_GROUP);
+ /* Extra data for smartreply */
+ app_control_add_extra_data(app_control, APP_CONTROL_DATA_INPUT_PREDICTION_HINT, "How are you");
+ /* Extra data for return key type */
+ app_control_add_extra_data(app_control, APP_CONTROL_DATA_INPUT_RETURNKEY_TYPE, "Done");
+ /* Extra data for setting limit of text length */
+ app_control_add_extra_data(app_control, APP_CONTROL_DATA_INPUT_MAX_TEXT_LENGTH, "10");
+ app_control_send_launch_request(app_control, input_selector_result, NULL);
+ app_control_destroy(app_control);
+}
+
+static void
+input_selector_result(app_control_h request, app_control_h reply, app_control_result_e result, void *user_data)
+{
+ char *value;
+ char *type;
+ 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 the result string */
+ }
+ /* To get input type of result from input delegator */
+ app_control_get_extra_data(reply, APP_CONTROL_DATA_INPUT_REPLY_TYPE, &type);
+ char **path_array = NULL;
+ int path_array_len = -1;
+ ret = app_control_get_extra_data_array(reply, APP_CONTROL_DATA_PATH, &path_array, &path_array_len);
+ dlog_print(DLOG_DEBUG, LOG_TAG, "len %d", path_array_len);
+ if (ret == APP_CONTROL_ERROR_NONE && path_array_len != -1) {
+ for (int i = 0; i < path_array_len; ++i) {
+ if (path_array[i])
+ dlog_print(DLOG_DEBUG, LOG_TAG, "path %s", path_array[i]);
+ }
+ }
+ }
+}
+</pre>
+
<h2 id="map" name="map">Map</h2>
<div class="note">
}
</pre>
-<h2 id="inputdelegator" name="inputdelegator">Input Delegator in Wearable Applications</h2>
-
- <div class="note">
- <strong>Note</strong>
- In wearable applications, this application control is available since Tizen 2.3.2.
- </div>
-
-<h3>Receiving User Input</h3>
-
-<p>To receive a specific type of input from the user, use the <code>APP_CONTROL_OPERATION_GET_INPUT</code> operation. To give an option for the input delegator, refer to the extras defined below.</p>
-
-<p align="center"><strong>Figure: Receiving user input</strong></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><code>http://tizen.org/appcontrol/operation/get_input</code> (in <code>.c</code> files and manifest file)</li>
-<li><code>APP_CONTROL_OPERATION_GET_INPUT</code> (in <code>.c</code> files only)</li>
-</ul>
-<h4>MIME Type (Mandatory)</h4>
-<ul>
-<li>
- <p><code>text/plain</code></p>
-</li>
-</ul>
-<h4>Extra Input</h4>
- <table>
- <tbody>
- <tr>
- <th>Key</th>
- <th>Description</th>
- <th>Note</th>
- </tr>
- <tr>
- <td><code>APP_CONTROL_DATA_INPUT_TYPE</code></td>
- <td>The input method type. This key must be passed as a string. The available values are:
- <ul>
- <li><code>input_voice</code>: Ask for voice input</li>
- <li><code>input_emoticon</code>: Ask for emoticon input</li>
- <li><code>input_keyboard</code>: Ask for keyboard input</li>
- </ul>
- </td>
- <td rowspan="4">This key is optional.</td>
- </tr>
- <tr>
- <td><code>APP_CONTROL_DATA_INPUT_DEFAULT_TEXT</code></td>
- <td>The preformatted text to be used as default input, such as "http://" for Web addresses. This key must be passed as a string.</td>
- </tr>
- <tr>
- <td><code>APP_CONTROL_DATA_INPUT_GUIDE_TEXT</code></td>
- <td>The guide text, such as "Input user name". This key must be passed as a string.</td>
- </tr>
- <tr>
- <td><code>APP_CONTROL_DATA_INPUT_PREDICTION_HINT</code></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>
- </tr>
- <tr>
- <td><code>APP_CONTROL_DATA_TEXT</code></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 <app_control.h>
-
-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, "text/plain");
- 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);
-}
-
-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 the result string */
- }
- }
-}
-</pre>
-
<script type="text/javascript" src="../../scripts/jquery.zclip.min.js"></script>
<script type="text/javascript" src="../../scripts/showhide.js"></script>
</div></div></div>
<li><a href="#contact">Contact</a></li>
<li><a href="#email">Email</a></li>
<li><a href="#file">File Storage</a></li>
+ <li><a href="#inputdelegator">Input Delegator</a></li>
<li><a href="#map">Map</a></li>
<li><a href="#message">Message</a></li>
<li><a href="#multimedia">Multimedia</a></li>
</ul>
</li>
<li><a href="#voice">Voice Recorder</a></li>
- <li><a href="#inputdelegator">Input Delegator</a></li>
</ul>
<p class="toc-title">Related Info</p>
<ul class="toc">
<p>The Application API is mandatory for both Tizen mobile and wearable profiles, which means that it is supported in all mobile and wearable devices. All mandatory APIs are supported on the Tizen Emulators.</p>
-<p>All the common application controls are supported in mobile applications, except for the Input Delegator. In Tizen 2.3.2 and higher, only the Map and Input Delegator are supported in wearable applications.</p>
+<p>All the common application controls are supported in mobile applications. The input delegator is supported in mobile and TV applications since Tizen 4.0, with limited features. In wearable applications, only the map and input delegator application controls are supported.</p>
<div class="note">
<strong>Note</strong>
}, null);
</pre>
+<h2 id="inputdelegator" name="inputdelegator">Input Delegator</h2>
+
+ <div class="note">
+ <strong>Note</strong>
+ The input delegator is supported in wearable applications since Tizen 2.3.2, and in mobile and TV applications, with limited features, since Tizen 4.0.
+ </div>
+
+<h3>Receiving User Input</h3>
+
+<p>To receive specific type of input from the user, use the <code>http://tizen.org/appcontrol/operation/get_input</code> operation. To give an option for the input delegator, refer to the extras defined below.</p>
+
+<p align="center"><strong>Figure: Receiving user input</strong></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><code>http://tizen.org/appcontrol/operation/get_input</code></li>
+</ul>
+<h4>MIME Type (Mandatory)</h4>
+<ul>
+<li><code>text/plain</code></li>
+<li><code>image/*</code></li>
+<li><code>audio/*</code></li>
+<li><code>*/*</code></li>
+</ul>
+<h4>Extra Input</h4>
+ <table>
+ <tbody>
+ <tr>
+ <th>Key</th>
+ <th>Description</th>
+ <th>Note</th>
+ </tr>
+ <tr>
+ <td><code>http://tizen.org/appcontrol/data/input_type</code></td>
+ <td>The input method type. This key must be passed as a string. The available values are:
+ <ul>
+ <li><code>input_voice</code>: Ask for voice input</li>
+ <li><code>input_emoticon</code>: Ask for emoticon input</li>
+ <li><code>input_keyboard</code>: Ask for keyboard input</li>
+ <li><code>input_reply</code>: Ask for reply input</li>
+ <li><code>input_drawing</code>: Ask for drawing input</li>
+ <li><code>input_recording</code>: Ask for recording input</li>
+ </ul>
+ </td>
+ <td>This key is optional.
+ <p><strong>The <code>input_reply</code>, <code>input_drawing</code> and <code>input_recording</code> values are supported since Tizen 4.0, in wearable applications only.</strong></p></td>
+ </tr>
+ <tr>
+ <td><code>http://tizen.org/appcontrol/data/input_default_text</code></td>
+ <td>The preformatted text to be used as default input, such as "http://" for Web addresses. This key must be passed as a string.</td>
+ <td rowspan="3">This key is optional.</td>
+ </tr>
+ <tr>
+ <td><code>http://tizen.org/appcontrol/data/input_default_text</code></td>
+ <td>The guide text, such as "Input user name". This key must be passed as a string.</td>
+ </tr>
+ <tr>
+ <td><code>http://tizen.org/appcontrol/data/input_guide_text</code></td>
+ <td>The text to receive an answer result from a smart reply. This key must be passed as a string.</td>
+ </tr>
+ <tr>
+ <td><code>http://tizen.org/appcontrol/data/input_returnkey_type</code></td>
+ <td>The return key used in the keyboard input type. This key must be passed as a string. The available values are:
+ <ul>
+ <li><code>Done</code>: Set key label to <strong>Done</strong></li>
+ <li><code>Send</code>: Set key label to <strong>Send</strong></li>
+ <li><code>Join</code>: Set key label to <strong>Join</strong></li>
+ <li><code>Login</code>: Set key label to <strong>Login</strong></li>
+ <li><code>Next</code>: Set key label to <strong>Next</strong></li>
+ <li><code>Sign-in</code>: Set key label to <strong>Sign-in</strong></li>
+ <li><code>Search</code>: Set key label to <strong>Search</strong></li>
+ <li><code>Go</code>: Set key label to <strong>Go</strong></li>
+ </ul>
+ </td>
+ <td rowspan="2">This key is optional, and <strong>it is supported since Tizen 4.0.</strong></td>
+ </tr>
+ <tr>
+ <td><code>http://tizen.org/appcontrol/data/input_max_text_length</code></td>
+ <td>The maximum text length allowed in the keyboard input type. This key must be passed as a string.</td>
+ </tr>
+ <tr>
+ <td><code>http://tizen.org/appcontrol/data/input_reply_type</code></td>
+ <td>The reply type. This key must be passed as a string. The available values are:
+ <ul>
+ <li><code>input_voice</code>: Receive the result as voice</li>
+ <li><code>input_emoticon</code>: Receive the result as an emoticon</li>
+ <li><code>input_keyboard</code>: Receive the result as keyboard input</li>
+ <li><code>input_reply</code>: Receive the result as reply input</li>
+ <li><code>input_image</code>: Receive the result as an image</li>
+ <li><code>input_audio</code>: Receive the result as audio</li>
+ </ul>
+ </td>
+ <td>This key is optional, and <strong>it is supported since Tizen 4.0, in wearable applications only.</strong></td>
+ </tr>
+ </tbody>
+ </table>
+
+<h4>Extra Output</h4>
+ <table>
+ <tbody>
+ <tr>
+ <th>Key</th>
+ <th>Value description</th>
+ <th>Note</th>
+ </tr>
+ <tr>
+ <td><code>http://tizen.org/appcontrol/data/text</code></td>
+ <td>The result string from the input delegator. This key must be passed as a string.</td>
+ <td>-</td>
+ </tr>
+ <tr>
+ <td><code>http://tizen.org/appcontrol/data/path</code></td>
+ <td>The list of multiple file paths from the input delegator. This key must be passed as an array.</td>
+ <td><strong>This key is supported since Tizen 4.0, in wearable applications only.</strong></td>
+ </tr>
+ </tbody>
+ </table>
+<h4>Example Code</h4>
+<pre class="prettyprint">
+var appControlData = new tizen.ApplicationControlData('http://tizen.org/appcontrol/data/input_type', ['input_voice']);
+var appControl = new tizen.ApplicationControl('http://tizen.org/appcontrol/operation/get_input',
+ null, 'text/plain', null, [appControlData], null);
+
+tizen.application.launchAppControl(appControl, null, function() {
+ console.log('launch application control succeed');
+}, function(e) {
+ console.log('launch application control failed. reason: ' + e.message);
+}, null);
+</pre>
<h2 id="map" name="map">Map</h2>
}, null);
</pre>
-<h2 id="inputdelegator" name="inputdelegator">Input Delegator in Wearable Applications</h2>
-
-<div class="note">
- <strong>Note</strong>
- In wearable applications, this application control is available since Tizen 2.3.2.
-</div>
-
-<h3>Receiving User Input</h3>
-
-<p>To receive specific type of input from the user, use the <code>http://tizen.org/appcontrol/operation/get_input</code> operation. To give an option for the input delegator, refer to the extras defined below.</p>
-
-<p align="center"><strong>Figure: Receiving user input</strong></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><code>http://tizen.org/appcontrol/operation/get_input</code></li>
-</ul>
-<h4>MIME Type (Mandatory)</h4>
-<ul>
-<li>
- <p><code>text/plain</code></p>
-</li>
-</ul>
-<h4>Extra Input</h4>
- <table>
- <tbody>
- <tr>
- <th>Key</th>
- <th>Description</th>
- <th>Note</th>
- </tr>
- <tr>
- <td><code>http://tizen.org/appcontrol/data/input_type</code></td>
- <td>The input method type. This key must be passed as a string. The available values are:
- <ul>
- <li><code>input_voice</code>: Ask for voice input</li>
- <li><code>input_emoticon</code>: Ask for emoticon input</li>
- <li><code>input_keyboard</code>: Ask for keyboard input</li>
- </ul>
- </td>
- <td rowspan="4">This key is optional.</td>
- </tr>
- <tr>
- <td><code>http://tizen.org/appcontrol/data/input_default_text</code></td>
- <td>The preformatted text to be used as default input, such as "http://" for Web addresses. This key must be passed as a string.</td>
- </tr>
- <tr>
- <td><code>http://tizen.org/appcontrol/data/input_default_text</code></td>
- <td>The guide text, such as "Input user name". This key must be passed as a string.</td>
- </tr>
- <tr>
- <td><code>http://tizen.org/appcontrol/data/input_guide_text</code></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>
- </tr>
- <tr>
- <td><code>http://tizen.org/appcontrol/data/text</code></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">
-var appControlData = new tizen.ApplicationControlData('http://tizen.org/appcontrol/data/input_type', ['input_voice']);
-
-var appControl = new tizen.ApplicationControl('http://tizen.org/appcontrol/operation/get_input',
- null, 'text/plain', null, [appControlData], null);
-
-tizen.application.launchAppControl(appControl, null, function() {
- console.log('launch application control succeed');
-}, function(e) {
- console.log('launch application control failed. reason: ' + e.message);
-}, null);
-</pre>
-
<script type="text/javascript" src="../../scripts/jquery.zclip.min.js"></script>
<script type="text/javascript" src="../../scripts/showhide.js"></script>
</div></div></div>