From: Jin-Woo Jeong Date: Tue, 8 Sep 2015 03:32:00 +0000 (+0900) Subject: Revise common app control specification X-Git-Tag: tizen_3.0/TD_SYNC/20161201~554 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c4e368e66b6b2535608b8016dbd78c77563c4452;p=sdk%2Fonline-doc.git Revise common app control specification Change-Id: I6c1d3f0a506036358f5b5cf624e01ff3bef8f9b6 --- diff --git a/org.tizen.guides/html/images/common_appcontrol_browser.png b/org.tizen.guides/html/images/common_appcontrol_browser.png index dbe9f6a..90f4a9f 100644 Binary files a/org.tizen.guides/html/images/common_appcontrol_browser.png and b/org.tizen.guides/html/images/common_appcontrol_browser.png differ diff --git a/org.tizen.guides/html/images/common_appcontrol_browser2.png b/org.tizen.guides/html/images/common_appcontrol_browser2.png index d789943..09edc29 100644 Binary files a/org.tizen.guides/html/images/common_appcontrol_browser2.png and b/org.tizen.guides/html/images/common_appcontrol_browser2.png differ diff --git a/org.tizen.guides/html/images/common_appcontrol_calendar.png b/org.tizen.guides/html/images/common_appcontrol_calendar.png index 26dc7dc..5bd0ba2 100644 Binary files a/org.tizen.guides/html/images/common_appcontrol_calendar.png and b/org.tizen.guides/html/images/common_appcontrol_calendar.png differ diff --git a/org.tizen.guides/html/images/common_appcontrol_calendar2.png b/org.tizen.guides/html/images/common_appcontrol_calendar2.png index bbab557..a376729 100644 Binary files a/org.tizen.guides/html/images/common_appcontrol_calendar2.png and b/org.tizen.guides/html/images/common_appcontrol_calendar2.png differ diff --git a/org.tizen.guides/html/images/common_appcontrol_calendar3.png b/org.tizen.guides/html/images/common_appcontrol_calendar3.png index 8a63743..1d6e8ce 100644 Binary files a/org.tizen.guides/html/images/common_appcontrol_calendar3.png and b/org.tizen.guides/html/images/common_appcontrol_calendar3.png differ diff --git a/org.tizen.guides/html/images/common_appcontrol_calendar4.png b/org.tizen.guides/html/images/common_appcontrol_calendar4.png index fa989b0..24dc726 100644 Binary files a/org.tizen.guides/html/images/common_appcontrol_calendar4.png and b/org.tizen.guides/html/images/common_appcontrol_calendar4.png differ diff --git a/org.tizen.guides/html/images/common_appcontrol_call1.png b/org.tizen.guides/html/images/common_appcontrol_call1.png index 08d869d..8b94e8f 100644 Binary files a/org.tizen.guides/html/images/common_appcontrol_call1.png and b/org.tizen.guides/html/images/common_appcontrol_call1.png differ diff --git a/org.tizen.guides/html/images/common_appcontrol_call2.png b/org.tizen.guides/html/images/common_appcontrol_call2.png index 757f259..85f0e55 100644 Binary files a/org.tizen.guides/html/images/common_appcontrol_call2.png and b/org.tizen.guides/html/images/common_appcontrol_call2.png differ diff --git a/org.tizen.guides/html/images/common_appcontrol_camera.png b/org.tizen.guides/html/images/common_appcontrol_camera.png new file mode 100644 index 0000000..207ccb6 Binary files /dev/null and b/org.tizen.guides/html/images/common_appcontrol_camera.png differ diff --git a/org.tizen.guides/html/images/common_appcontrol_camera2.png b/org.tizen.guides/html/images/common_appcontrol_camera2.png new file mode 100644 index 0000000..fd83c62 Binary files /dev/null and b/org.tizen.guides/html/images/common_appcontrol_camera2.png differ diff --git a/org.tizen.guides/html/images/common_appcontrol_contact_add.png b/org.tizen.guides/html/images/common_appcontrol_contact_add.png index f9218bf..08d22a3 100644 Binary files a/org.tizen.guides/html/images/common_appcontrol_contact_add.png and b/org.tizen.guides/html/images/common_appcontrol_contact_add.png differ diff --git a/org.tizen.guides/html/images/common_appcontrol_contact_edit.png b/org.tizen.guides/html/images/common_appcontrol_contact_edit.png index 0ac5425..22b1ad0 100644 Binary files a/org.tizen.guides/html/images/common_appcontrol_contact_edit.png and b/org.tizen.guides/html/images/common_appcontrol_contact_edit.png differ diff --git a/org.tizen.guides/html/images/common_appcontrol_contact_select.png b/org.tizen.guides/html/images/common_appcontrol_contact_select.png index 1a39211..f0e8501 100644 Binary files a/org.tizen.guides/html/images/common_appcontrol_contact_select.png and b/org.tizen.guides/html/images/common_appcontrol_contact_select.png differ diff --git a/org.tizen.guides/html/images/common_appcontrol_contact_view1.png b/org.tizen.guides/html/images/common_appcontrol_contact_view1.png index 091c11e..222dc73 100644 Binary files a/org.tizen.guides/html/images/common_appcontrol_contact_view1.png and b/org.tizen.guides/html/images/common_appcontrol_contact_view1.png differ diff --git a/org.tizen.guides/html/images/common_appcontrol_contact_view2.png b/org.tizen.guides/html/images/common_appcontrol_contact_view2.png index 3d1ead5..7702ef4 100644 Binary files a/org.tizen.guides/html/images/common_appcontrol_contact_view2.png and b/org.tizen.guides/html/images/common_appcontrol_contact_view2.png differ diff --git a/org.tizen.guides/html/images/common_appcontrol_message.png b/org.tizen.guides/html/images/common_appcontrol_message.png index 237526e..acdec81 100644 Binary files a/org.tizen.guides/html/images/common_appcontrol_message.png and b/org.tizen.guides/html/images/common_appcontrol_message.png differ diff --git a/org.tizen.guides/html/images/common_appcontrol_message4.png b/org.tizen.guides/html/images/common_appcontrol_message4.png index 56cf873..d7896fc 100644 Binary files a/org.tizen.guides/html/images/common_appcontrol_message4.png and b/org.tizen.guides/html/images/common_appcontrol_message4.png differ diff --git a/org.tizen.guides/html/images/common_appcontrol_system_bluetooth.png b/org.tizen.guides/html/images/common_appcontrol_system_bluetooth.png index b364b20..58f2a2e 100644 Binary files a/org.tizen.guides/html/images/common_appcontrol_system_bluetooth.png and b/org.tizen.guides/html/images/common_appcontrol_system_bluetooth.png differ diff --git a/org.tizen.guides/html/images/common_appcontrol_system_bluetooth2.png b/org.tizen.guides/html/images/common_appcontrol_system_bluetooth2.png index 2b09367..ff76a29 100644 Binary files a/org.tizen.guides/html/images/common_appcontrol_system_bluetooth2.png and b/org.tizen.guides/html/images/common_appcontrol_system_bluetooth2.png differ diff --git a/org.tizen.guides/html/images/common_appcontrol_system_location.png b/org.tizen.guides/html/images/common_appcontrol_system_location.png index bdd4f8c..a19f294 100644 Binary files a/org.tizen.guides/html/images/common_appcontrol_system_location.png and b/org.tizen.guides/html/images/common_appcontrol_system_location.png differ diff --git a/org.tizen.guides/html/images/common_appcontrol_system_location2.png b/org.tizen.guides/html/images/common_appcontrol_system_location2.png new file mode 100644 index 0000000..fee90b6 Binary files /dev/null and b/org.tizen.guides/html/images/common_appcontrol_system_location2.png differ diff --git a/org.tizen.guides/html/images/common_appcontrol_system_setting.png b/org.tizen.guides/html/images/common_appcontrol_system_setting.png index d24ad84..1562789 100644 Binary files a/org.tizen.guides/html/images/common_appcontrol_system_setting.png and b/org.tizen.guides/html/images/common_appcontrol_system_setting.png differ diff --git a/org.tizen.guides/html/images/common_appcontrol_system_wifi.png b/org.tizen.guides/html/images/common_appcontrol_system_wifi.png index 2b3adc1..a805867 100644 Binary files a/org.tizen.guides/html/images/common_appcontrol_system_wifi.png and b/org.tizen.guides/html/images/common_appcontrol_system_wifi.png differ diff --git a/org.tizen.guides/html/native/app/appcontrol_n.htm b/org.tizen.guides/html/native/app/appcontrol_n.htm index 5849b42..83e64a5 100644 --- a/org.tizen.guides/html/native/app/appcontrol_n.htm +++ b/org.tizen.guides/html/native/app/appcontrol_n.htm @@ -361,22 +361,29 @@ static void app_control(app_control_h app_control, void *user_data)

Common Application Controls

-

Tizen provides common application controls that allow you to take advantage of the Tizen base application functionalities. You can use the common application controls to perform some basic tasks, such as selecting a file or taking a picture.

+

The Tizen common application controls specify a standard protocol for sharing application functionalities. You can use the common application controls to perform some basic tasks, such as selecting a file or taking a picture.

The following common application controls are available:

diff --git a/org.tizen.guides/html/native/app/common_appcontrol_n.htm b/org.tizen.guides/html/native/app/common_appcontrol_n.htm index 9542403..23e554f 100644 --- a/org.tizen.guides/html/native/app/common_appcontrol_n.htm +++ b/org.tizen.guides/html/native/app/common_appcontrol_n.htm @@ -25,15 +25,21 @@
  • Browser
  • Calendar
  • Call
  • +
  • Camera
  • Contact
  • Email
  • +
  • File Storage
  • Map
  • Message
  • -
  • Settings for Bluetooth
  • -
  • Settings for Location
  • -
  • Settings for NFC
  • -
  • Settings for Wi-Fi
  • +
  • Multimedia
  • System Settings
  • + +
  • Voice Recorder
  • Related Info

    - +

    Extra Input

    +

    N/A

    +

    Extra Output

    +

    N/A

    Example Code

     app_control_h app_control;
    @@ -129,10 +152,12 @@ app_control_destroy(app_control);
     

    To add a new event to the user's calendar, use the APP_CONTROL_OPERATION_ADD operation with the application/vnd.tizen.calendar MIME type. To specify various event details, refer to the extras defined below.

    Figure: Adding a calendar event

    -

    Adding a calendar event

    +

    Adding a calendar event

    Operation

    APP_CONTROL_OPERATION_ADD

    +

    URI

    +

    N/A

    MIME Type (Mandatory)

    application/vnd.tizen.calendar

    Extra Input

    @@ -146,7 +171,7 @@ app_control_destroy(app_control); APP_CONTROL_DATA_CALENDAR_ALLDAY The string to indicate if an event applies to all day. Available values are true or false. This key must be passed as a string. - This key is optional. + This key is optional. APP_CONTROL_DATA_CALENDAR_START_TIME @@ -188,7 +213,9 @@ app_control_h service; app_control_create(&service); app_control_set_operation(service, APP_CONTROL_OPERATION_ADD); -app_control_add_extra_data(service, APP_CONTROL_DATA_TITLE, "Meeting with Jason"); +app_control_set_mime(service, "application/vnd.tizen.calendar"); +app_control_add_extra_data(service, APP_CONTROL_DATA_TITLE, "My event"); +app_control_add_extra_data(service, APP_CONTROL_DATA_TEXT, "My event text"); app_control_set_launch_mode(service, APP_CONTROL_LAUNCH_MODE_GROUP); app_control_send_launch_request(service, NULL, NULL); @@ -199,10 +226,12 @@ app_control_send_launch_request(service, NULL, NULL);

    To edit an existing event in the user's calendar, use the APP_CONTROL_OPERATION_EDIT operation with the application/vnd.tizen.calendar MIME type. To specify various event details, refer to the extras defined below.

    Figure: Editing a calendar event

    -

    Editing a calendar event

    +

    Editing a calendar event

    Operation

    APP_CONTROL_OPERATION_EDIT

    +

    URI

    +

    N/A

    MIME Type (Mandatory)

    application/vnd.tizen.calendar

    Extra Input

    @@ -221,7 +250,7 @@ app_control_send_launch_request(service, NULL, NULL); APP_CONTROL_DATA_CALENDAR_ALLDAY The string to indicate if an event applies to all day. Available values are true or false. This key must be passed as a string. - This key is optional. + This key is optional. APP_CONTROL_DATA_CALENDAR_START_TIME @@ -262,8 +291,10 @@ app_control_h service; app_control_create(&service); app_control_set_operation(service, APP_CONTROL_OPERATION_EDIT); +app_control_set_mime(service, "application/vnd.tizen.calendar"); app_control_add_extra_data(service, APP_CONTROL_DATA_ID, "42"); -app_control_add_extra_data(service, APP_CONTROL_DATA_TITLE, "Meeting with Jason"); +app_control_add_extra_data(service, APP_CONTROL_DATA_TITLE, "Edited Title"); +app_control_add_extra_data(service, APP_CONTROL_DATA_CALENDAR_ALL_DAY, "true"); app_control_set_launch_mode(service, APP_CONTROL_LAUNCH_MODE_GROUP); app_control_send_launch_request(service, NULL, NULL); @@ -271,11 +302,11 @@ app_control_send_launch_request(service, NULL, NULL);

    Viewing a Calendar Event

    -

    To display a specified event in the user's calendar, use the APP_CONTROL_OPERATION_VIEW operation with the application/vnd.tizen.calendar MIME type. To specify various event details, refer to the extras defined below.

    -

    In case of viewing an event from a VCalendar file, the file path URI and text/x-vcalendar MIME type must be specified. In case of viewing an event by an event ID, the event ID (ID in the _calendar_event view) extra data and application/vnd.tizen.calendar MIME type must be specified.

    +

    To display a specified event in the user's calendar, use the APP_CONTROL_OPERATION_VIEW operation. To specify various event details, refer to the extras defined below.

    +

    To display a specified event from vcalendar file, use file: URI. To display a specified event using calendar id, use application/vnd.tizen.calendar MIME type with APP_CONTROL_DATA_ID.

    Figure: Viewing a calendar event

    -

    Viewing a calendar event

    +

    Viewing a calendar event

    Operation

    APP_CONTROL_OPERATION_VIEW

    @@ -284,8 +315,11 @@ app_control_send_launch_request(service, NULL, NULL);

    For example: file://<media storage path>/file.vcs

    MIME Type

    Extra Input

    @@ -302,6 +336,8 @@ app_control_send_launch_request(service, NULL, NULL);
    +

    Extra Input

    +

    N/A

    Example Code

     // To view a calendar event from a vcs file
    @@ -329,10 +365,12 @@ app_control_destroy(service);
     
     

    To select a specified event in the user's calendar, use the APP_CONTROL_OPERATION_PICK operation with the application/vnd.tizen.calendar MIME type. To specify various event details, refer to the extras defined below.

    Figure: Selecting a calendar event

    -

    Selecting a calendar event

    +

    Selecting a calendar event

    Operation

    APP_CONTROL_OPERATION_PICK

    +

    URI

    +

    N/A

    MIME Type (Mandatory)

    application/vnd.tizen.calendar

    Extra Input

    @@ -346,7 +384,7 @@ app_control_destroy(service); APP_CONTROL_DATA_TYPE The type of items to be delivered. The available values are id and vcs (id is the default, if not presented). This key must be passed as a string. - This key is optional. + This key is optional. APP_CONTROL_DATA_SELECTION_MODE @@ -383,6 +421,7 @@ app_control_h service; app_control_create(&service); app_control_set_operation(service, APP_CONTROL_OPERATION_PICK); +app_control_set_mime(service, "application/vnd.tizen.calendar"); app_control_add_extra_data(service, APP_CONTROL_DATA_TYPE, "id"); app_control_add_extra_data(service, APP_CONTROL_ SELECTION_MODE, "single"); app_control_set_launch_mode(service, APP_CONTROL_LAUNCH_MODE_GROUP); @@ -395,7 +434,7 @@ app_control_send_launch_request(service, NULL, NULL);

    Making a Phone Call

    To directly initiate a phone call, use the APP_CONTROL_OPERATION_CALL operation with a phone number URI scheme.

    Figure: Making a phone call

    -

    Making a phone call

    +

    Making a phone call

    Operation

    APP_CONTROL_OPERATION_CALL

    @@ -403,6 +442,12 @@ app_control_send_launch_request(service, NULL, NULL);

    URI (Mandatory)

    tel:<number>

    For example: tel:+821234567890

    +

    MIME Type

    +

    N/A

    +

    Extra Input

    +

    N/A

    +

    Extra Output

    +

    N/A

    Code Example

     void 
    @@ -411,7 +456,7 @@ launchCall()
        app_control_h request = NULL;
        app_control_create(&request);
        app_control_set_operation(request, APP_CONTROL_OPERATION_CALL);
    -   app_control_set_uri(request, "tel:+380665554433");
    +   app_control_set_uri(request, "0123456789");
     
        app_control_send_launch_request(request, NULL, NULL);
        app_control_destroy(request);
    @@ -423,13 +468,20 @@ launchCall()
     
     

    To open a call application and display a predefined a phone number, use the APP_CONTROL_OPERATION_DIAL action with a phone number URI scheme. When the call application opens, it displays the phone number, but the user must press the Call button to initiate the phone call.

    Figure: Launching a Call application

    -

    Launching a Call application

    +

    Launching a Call application

    Operation

    APP_CONTROL_OPERATION_DIAL

    URI (Optional)

    tel:<number>

    +

    If empty, a dialler UI without number will be presented.

    For example: tel:+821234567890

    +

    MIME Type

    +

    N/A

    +

    Extra Input

    +

    N/A

    +

    Extra Output

    +

    N/A

    Example Code

     void 
    @@ -438,7 +490,7 @@ launchCall()
        app_control_h request = NULL;
        app_control_create(&request);
        app_control_set_operation(request, APP_CONTROL_OPERATION_DIAL);
    -   app_control_set_uri(request "tel:+380665554433");
    +   app_control_set_uri(request, 0123456789);
     
        app_control_send_launch_request(request, NULL, NULL);
        app_control_destroy(request);
    @@ -446,16 +498,180 @@ launchCall()
     
    -

    Contact

    +

    Camera

    + +

    Capture a picture or video

    +

    To take picture or record video, use the APP_CONTROL_OPERATION_CREATE_CONTENT operation with the MIME type. To specify an option, refer to the extras defined below.

    +

    Figure: Taking pictures (Left) and recording videos (Right)

    +

    Taking picture Recording video

    +

    Operation

    +

    APP_CONTROL_OPERATION_CREATE_CONTENT

    +

    URI

    +

    N/A

    +

    MIME Type (Mandatory)

    +

    image/*

    +

    video/*

    + +

    Extra Input

    + + + + + + + + + + + + + +
    KeyDescriptionNote
    APP_CONTROL_DATA_TOTAL_SIZEThe total size of items to be returned in bytes. This key must be passed as a string.This key is optional.
    +

    Extra Output

    + + + + + + + + + + + +
    KeyDescription
    APP_CONTROL_DATA_SELECTEDThe path of the created image or video file. This key must be passed as a string.
    +

    Example Code

    +
    +#include 
    +
    +app_control_h service;
    +app_control_create(&service);
    +
    +app_control_set_operation(service, APP_CONTROL_OPERATION_CREATE_CONTENT);
    +app_control_set_mime(service, “image/png”);
    +app_control_send_launch_request(service, NULL, NULL);
    +
    +app_control_destory(service);
    +
    + +

    Capture a picture

    +

    To capture still image, use the APP_CONTROL_OPERATION_IMAGE_CAPTURE operation. To specify an option, refer to the extras defined below.

    +

    Figure: Taking a picture

    +

    Taking picture

    +

    Operation

    +

    APP_CONTROL_OPERATION_IMAGE_CAPTURE

    +

    URI

    +

    N/A

    +

    MIME Type

    +

    N/A

    + +

    Extra Input

    + + + + + + + + + + + + + +
    KeyDescriptionNote
    APP_CONTROL_DATA_TOTAL_SIZEThe total size of items to be returned in bytes. This key must be passed as a string.This key is optional.
    +

    Extra Output

    + + + + + + + + + + + +
    KeyDescription
    APP_CONTROL_DATA_SELECTEDThe path of the created file. This key must be passed as a string.
    +

    Example Code

    +
    +#include 
    +
    +app_control_h service;
    +app_control_create(&service);
    +
    +app_control_set_operation(service, APP_CONTROL_OPERATION_IMAGE_CAPTURE);
    +app_control_send_launch_request(service, NULL, NULL);
    +
    +app_control_destory(service);
    +
    +
    + +

    Capture a video

    +

    To record video, use the APP_CONTROL_OPERATION_VIDEO_CAPTURE operation. To specify an option, refer to the extras defined below.

    +

    Figure: Record a video

    +

    Recording video

    +

    Operation

    +

    APP_CONTROL_OPERATION_VIDEO_CAPTURE

    +

    URI

    +

    N/A

    +

    MIME Type

    +

    N/A

    + +

    Extra Input

    + + + + + + + + + + + + + +
    KeyDescriptionNote
    APP_CONTROL_DATA_TOTAL_SIZEThe total size of items to be returned in bytes. This key must be passed as a string.This key is optional.
    +

    Extra Output

    + + + + + + + + + + + +
    KeyDescription
    APP_CONTROL_DATA_SELECTEDThe path of the created file. This key must be passed as a string.
    +

    Example Code

    +
    +#include 
    +
    +app_control_h service;
    +app_control_create(&service);
    +
    +app_control_set_operation(service, APP_CONTROL_OPERATION_VIDEO_CAPTURE);
    +app_control_send_launch_request(service, NULL, NULL);
    +
    +app_control_destory(service);
    +
    +
    +
    +

    Contact

    Adding a Contact

    To add a new contact, use the APP_CONTROL_OPERATION_ADD operation with the application/vnd.tizen.contact MIME type. To specify various contact details, refer to the extras defined below.

    Figure: Adding a contact

    -

    Adding a contact

    +

    Adding a contact

    Operation

    APP_CONTROL_OPERATION_ADD

    +

    URI

    +

    N/A

    MIME Type (Mandatory)

    application/vnd.tizen.contact

    Extra Input

    @@ -469,7 +685,7 @@ launchCall() APP_CONTROL_DATA_PHONE The phone number. This key must be passed as a string. - This key is optional. + This key is optional. APP_CONTROL_DATA_EMAIL @@ -500,26 +716,21 @@ launchCall()

    Example Code

    -int 
    -launchContactCreate(const char *number)
    -{
    +
        app_control_h request;
        app_control_create(&request);
        app_control_set_operation(request, APP_CONTROL_OPERATION_ADD);
        app_control_set_mime(request, "application/vnd.tizen.contact");
    -
    -   if (number) 
    -   {
    -      app_control_add_extra_data(request, APP_CONTROL_DATA_PHONE, number);
    -   }
    +   
    +   app_control_add_extra_data(request, APP_CONTROL_DATA_PHONE, "0123456789");
    +   app_control_add_extra_data(request, APP_CONTROL_DATA_EMAIL, "tizen@tizen.org");
    +   app_control_add_extra_data(request, APP_CONTROL_DATA_NAME, "Tizen User");
     
        app_control_set_launch_mode(request, APP_CONTROL_LAUNCH_MODE_GROUP);
     
        int result = app_control_send_launch_request(request, NULL, NULL);
        app_control_destroy(request);
     
    -   return result;
    -}
     
    @@ -528,10 +739,12 @@ launchContactCreate(const char *number)

    To edit a known contact, use the APP_CONTROL_OPERATION_EDIT operation with the application/vnd.tizen.contact MIME type. To specify various contact details, refer to the extras defined below.

    Figure: Editing a contact

    -

    Editing a contact

    +

    Editing a contact

    Operation

    APP_CONTROL_OPERATION_EDIT

    +

    URI

    +

    N/A

    MIME Type (Mandatory)

    application/vnd.tizen.contact

    Extra Input

    @@ -550,7 +763,7 @@ launchContactCreate(const char *number) APP_CONTROL_DATA_PHONE The phone number that is added to the contact. This key must be passed as a string. - This key is optional. + This key is optional. APP_CONTROL_DATA_EMAIL @@ -578,37 +791,29 @@ launchContactCreate(const char *number)

    Example Code

    -int 
    -launchContactEdit(const char* personId, const char *number)
    -{
        app_control_h request;
        app_control_create(&request);
        app_control_set_operation(request, APP_CONTROL_OPERATION_EDIT);
        app_control_set_mime(request, "application/vnd.tizen.contact");
     
        app_control_add_extra_data(request, APP_CONTROL_DATA_ID, personId);
    -	
    -   if (number) 
    -   {
    -      app_control_add_extra_data(request, APP_CONTROL_DATA_PHONE, number);
    -   }
    +   app_control_add_extra_data(request, APP_CONTROL_DATA_PHONE, "0987654321");
    +   app_control_add_extra_data(request, APP_CONTROL_DATA_EMAIL, "2nd Email");
    +
     
        app_control_set_launch_mode(request, APP_CONTROL_LAUNCH_MODE_GROUP);
     
        int result = app_control_send_launch_request(request, NULL, NULL);
        app_control_destroy(request);
    -
    -   return result;
    -}
     

    Viewing a Contact

    -

    To display a specified contact in the contact database, use the APP_CONTROL_OPERATION_VIEW operation with the application/vnd.tizen.contact MIME type. To specify various contact details, refer to the extras defined below.

    -

    In case of viewing a contact from a vcard file, the file path URI and text/vcard or text/x-vcard MIME type must be specified. In case of viewing a contact by a person ID, the person ID (ID in the _contact_person view) extra data and application/vnd.tizen.contact MIME type must be specified.

    +

    To display a specified contact in the contact database, use the APP_CONTROL_OPERATION_VIEW operation. To specify various contact details, refer to the extras defined below.

    +

    To display a specified contact from vcard file, use file: URI. To display a specified contact with person id, use application/vnd.tizen.contact MIME type with APP_CONTROL_DATA_ID.

    -

    Figure: Viewing a contact

    -

    Viewing a contact Viewing a contact

    +

    Figure: Viewing a contact from ID (Left) and from v-card file (Right)

    +

    Viewing a contact Viewing a contact

    Operation

    APP_CONTROL_OPERATION_VIEW

    @@ -616,7 +821,9 @@ launchContactEdit(const char* personId, const char *number)

    file:<path>

    MIME Type

      -
    • application/vnd.tizen.contact
    • +
    • application/vnd.tizen.contact +

      In case of viewing a contact by a person ID, the person ID (ID in the _contact_person view) extra data and application/vnd.tizen.contact MIME type must be specified.

      +
    • text/vcard
    • text/x-vcard
    @@ -677,10 +884,12 @@ int launchViewVcard(const char *uri)

    To select a specified contact in the user's contacts, use the APP_CONTROL_OPERATION_PICK operation with the application/vnd.tizen.contact MIME type. To specify various contact details, refer to the extras defined below.

    Figure: Selecting a contact

    -

    Selecting a contact

    +

    Selecting a contact

    Operation

    APP_CONTROL_OPERATION_PICK

    +

    URI

    +

    N/A

    MIME Type (Mandatory)

    application/vnd.tizen.contact

    Extra Input

    @@ -694,14 +903,14 @@ int launchViewVcard(const char *uri) APP_CONTROL_DATA_SELECTION_MODE The selection mode of the PICK operation. The available values are single and multiple (single is the default, if not presented). This key must be passed as a string. - This key is optional. + This key is optional. APP_CONTROL_DATA_TYPE The type of items to be delivered. The available values are id, phone, email, and vcf (id is the default, if not presented). This key must be passed as a string. - APP_CONTROL_DATA_TOTAL_COUNT + APP_CONTROL_DATA_TOTAL_COUNT The total number of events to be returned. This key must be passed as a string. @@ -753,21 +962,116 @@ launchContactPick(const char *selectionMode, const char *resultType, }
    +

    Sharing a Contact

    + +

    To share a single contact, use APP_CONTROL_OPERATION_SHARE operation with MIME-type “application/vnd.tizen.contact”. To specify various contact details, refer to the extras defined below.

    + +

    Operation

    +

    APP_CONTROL_OPERATION_SHARE

    +

    URI

    +

    N/A

    + +

    MIME Type (Mandatory)

    +

    application/vnd.tizen.contact

    +

    Extra Input

    + + + + + + + + + + + + + + + + + +
    KeyDescriptionNote
    APP_CONTROL_DATA_IDThe DB record ID of the person (id in _contacts_person view) when APP_CONTROL_DATA_TYPE is set to person. + The DB record ID of the my profile (id in _contacts_my_profile view) when APP_CONTROL_DATA_TYPE is set to my_profile. This key MUST be passed as a string.

    This key is mandatory.
    APP_CONTROL_DATA_TYPEThe type of contact. Available values are my_profile and person. This key MUST be passed as a string.
    +

    Extra Output

    +

    N/A

    +

    Example Code

    +
    +#include <app_control.h>
    +
    +app_control_h service;
    +app_control_create(&service);
    +
    +app_control_set_operation(service, APP_CONTROL_OPERATION_SHARE);
    +app_control_set_mime(service,"application/vnd.tizen.contact");
    +app_control_add_extra_data(service, APP_CONTROL_DATA_TYPE, "person");
    +app_control_add_extra_data(service, APP_CONTROL_DATA_ID, person_id);
    +app_control_set_launch_mode(service, APP_CONTROL_LAUNCH_MODE_GROUP);
    +
    +app_control_send_launch_request(service, NULL, NULL);
    +app_control_destroy(service);
    +
    + +

    Sharing Multiple Contacts

    + +

    To share a set of contacts, use APP_CONTROL_OPERATION_MULTI_SHARE operation with MIME-type “application/vnd.tizen.contact”. To specify various contact details, refer to the extras defined below.

    + +

    Operation

    +

    APP_CONTROL_OPERATION_MULTI_SHARE

    +

    URI

    +

    N/A

    + +

    MIME Type (Mandatory)

    +

    application/vnd.tizen.contact

    +

    Extra Input

    + + + + + + + + + + + + + +
    KeyDescriptionNote
    APP_CONTROL_DATA_IDThe DB record IDs of the person (id in _contacts_person view). This key MUST be passed as an array.This key is mandatory.
    +

    Extra Output

    +

    N/A

    +

    Example Code

    +
    +#include <app_control.h>
    +char* contacts[3] = {contact1, contact2, contact3}; // contact1, contact2, contact3 is person id.
    +app_control_h service;
    +app_control_create(&service);
    +
    +app_control_set_operation(service, APP_CONTROL_OPERATION_MULTI_SHARE);
    +app_control_set_mime(service,"application/vnd.tizen.contact");
    +app_control_add_extra_data_array(service, APP_CONTROL_DATA_ID, contacts, 3);
    +app_control_set_launch_mode(service, APP_CONTROL_LAUNCH_MODE_GROUP);
    +
    +app_control_send_launch_request(service, NULL, NULL);
    +app_control_destroy(service);
    +
    +

    Email

    Composing an Email

    -

    To launch an email composer with optional recipients, subject, and body text, use the APP_CONTROL_OPERATION_COMPOSE operation.

    +

    To compose an email with optional recipients, subject, and body text, use the APP_CONTROL_OPERATION_COMPOSE operation.

    Figure: Composing an email

    Composing an email

    Operation

    APP_CONTROL_OPERATION_COMPOSE

    -

    URI (Optional)

    +

    URI (Mandatory)

    mailto:<email address>

    If the mailto: field is empty, it filters out all but email applications in the system, and you can use the extra data only to pass optional parameters.

    - +

    MIME Type

    +

    N/A

    Extra Input

    @@ -778,48 +1082,52 @@ launchContactPick(const char *selectionMode, const char *resultType, - - + + - + - + - + - +
    APP_CONTROL_DATA_TOThe email address list of main recipients, separated by ";".This key is optional.The Email address of main recipient(s). This key MUST be passed as an array.This key is optional.
    APP_CONTROL_DATA_CCThe email address list of secondary (copy) recipients, separated by ";".The Email address of recipient(s) that should be carbon copied. This key MUST be passed as an array.
    APP_CONTROL_DATA_BCCThe email address list of hidden (blind copy) recipients, separated by ";".The Email address of recipient(s) that should be blind carbon copied. This key MUST be passed as an array.
    APP_CONTROL_DATA_SUBJECTThe subject of an email message. This key must be passed as a string.The subject of an email message. This key MUST be passed as a string.
    APP_CONTROL_DATA_TEXTThe body of the email to be sent. This key must be passed as a string.The body of the email to be sent. This key MUST be passed as a string.
    - +

    Extra Output

    +

    N/A

    Example Code

     app_control_h service;
     app_control_create(&service);
     
    +char* cc[2] = {"cc@tizen.org", "cc2@tizen.org"};
    +char* bcc[2] = {"bcc@tizen.org", "bcc2@tizen.org"};
     app_control_set_operation(service, APP_CONTROL_OPERATION_COMPOSE);
    -app_control_add_extra_data(service, APP_CONTROL_DATA_TO, "to@test.com");
    -app_control_add_extra_data(service, APP_CONTROL_DATA_CC, "cc@test.com");
    -app_control_add_extra_data(service, APP_CONTROL_DATA_BCC, "bcc@test.com");
    +app_control_set_uri(service, "mailto:to@tizen.org");
    +app_control_add_extra_data_array(service, APP_CONTROL_DATA_CC, cc, 2);
    +app_control_add_extra_data_array(service, APP_CONTROL_DATA_BCC, bcc, 2);
     app_control_add_extra_data(service, APP_CONTROL_DATA_SUBJECT, "test subject");
    -app_control_add_extra_data(service, APP_CONTROL_DATA_TEXT, "line1\nline2");
    +app_control_add_extra_data(service, APP_CONTROL_DATA_TEXT, "line1\nline2");
     
    -app_control_send_launch_request(service, NULL, NULL);
     app_control_set_launch_mode(service, APP_CONTROL_LAUNCH_MODE_GROUP);
    +app_control_send_launch_request(service, NULL, NULL);
    +
     app_control_destroy(service);
     
    -

    Sharing a Single File in an Email

    +

    Sharing a Single File using an Email Message

    -

    To share a single file of nay MIME type in an email message, use the APP_CONTROL_OPERATION_SHARE operation.

    +

    To share a single file of any MIME type using an email message, use the APP_CONTROL_OPERATION_SHARE operation.

    Figure: Sharing a single file

    Sharing a single file

    @@ -827,15 +1135,14 @@ app_control_destroy(service);

    Operation

    APP_CONTROL_OPERATION_SHARE

    URI (Mandatory)

    -
    • file:<full path to file> or <full path to file> (no scheme) -

      Using a URI with the file: scheme or without any scheme is the default input for this operation. If there is such a URI, all extra data is ignored.

    • +
      • file:<path>
      • mailto: -

        Only an empty mailto: field is allowed. It filters out all but email applications in the system.

      • +

        Only an empty mailto: field is allowed. This can be used to filter-out all email applications available in the system.

      -

      MIME Type (Optional)

      +

      MIME Type

      Any MIME type that your application needs, such as image/jpg, video/*, or */*

      - +

      In case of sharing a single item through APP_CONTROL_DATA_PATH and URI specified with mailto:, MIME-type MUST be explicitly set.

      Extra Input

      @@ -847,11 +1154,12 @@ app_control_destroy(service); - +
      APP_CONTROL_DATA_PATH When the URI is set to mailto, a path to a single file to be shared must be provided using this key. Otherwise, the key is ignored. This key must be passed as a string.This key is mandatory when the URI is set to mailto.This key is mandatory when the URI is set to mailto:.
      - +

      Extra Output

      +

      N/A

      Example Code

       #define PATH_MAX 128
      @@ -866,15 +1174,16 @@ app_control_create(&service);
       app_control_set_launch_mode(service, APP_CONTROL_LAUNCH_MODE_GROUP);
       app_control_set_operation(service, APP_CONTROL_OPERATION_SHARE);
       app_control_set_uri(service, "mailto:");
      +app_control_set_mime(service,"image/*");
       app_control_add_extra_data(service, APP_CONTROL_DATA_PATH, img_path);
       
       app_control_send_launch_request(service, NULL, NULL);
       app_control_destroy(service);
       
      -

      Sharing Multiple Items in an Email

      +

      Sharing Multiple Items using an Email Message

      -

      To share multiple files of any MIME type in an email message, use the APP_CONTROL_OPERATION_MULTI_SHARE operation.

      +

      To share multiple files of any MIME type using an email message, use the APP_CONTROL_OPERATION_MULTI_SHARE operation.

      Figure: Sharing multiple items

      Sharing multiple items

      @@ -883,11 +1192,11 @@ app_control_destroy(service);

      APP_CONTROL_OPERATION_MULTI_SHARE

      URI (Optional)

      mailto:

      -

      Only an empty mailto: field is allowed. It filters out all but email applications in the system.

      +

      Only an empty mailto: field is allowed. This can be used to filter-out all email applications available in the system.

      -

      MIME Type (Optional)

      +

      MIME Type (Mandatory)

      Any MIME type that your application needs, such as image/jpg, video/*, or */*

      - +

      If you try to share a set of files with different MIME types, use /* or */*. For example, if you send video/mp4 and audio/ogg, the MIME type MUST be */*.

      Extra Input

      @@ -903,7 +1212,8 @@ app_control_destroy(service);
      - +

      Extra Output

      +

      N/A

      Example Code

       #define PATH_MAX 128
      @@ -921,6 +1231,7 @@ app_control_create(&service);
       app_control_set_launch_mode(service, APP_CONTROL_LAUNCH_MODE_GROUP);
       app_control_set_operation(service, APP_CONTROL_OPERATION_MULTI_SHARE);
       app_control_set_uri(service, "mailto:");
      +app_control_set_mime(service,"image/*");
       app_control_add_extra_data_array(service, APP_CONTROL_DATA_PATH, path_array, 2);
       
       app_control_send_launch_request(service, NULL, NULL);
      @@ -936,10 +1247,11 @@ app_control_destroy(service);
       
       

      Operation

      APP_CONTROL_OPERATION_SHARE_TEXT

      -

      URI (Optional)

      +

      URI (Mandatory)

      mailto:

      Only an empty mailto: field is allowed. It filters out all but email applications in the system.

      - +

      MIME Type

      +

      N/A

      Extra Input

      @@ -957,11 +1269,11 @@ app_control_destroy(service); - + - +
      APP_CONTROL_DATA_SUBJECT The subject of an email message. This key must be passed as a string.This key is optional.This key is optional.
      APP_CONTROL_DATA_PATHThe list of multiple file paths to be shared in an email message. This key must be passed as an array.The list of multiple file paths to be shared using an email message. This key must be passed as an array.
      @@ -991,6 +1303,110 @@ app_control_send_launch_request(service, NULL, NULL); app_control_destroy(service);
      +

      File Storage

      + +

      Retrieve a specific type of file

      + +

      To select any kind of file from the storage, use the APP_CONTROL_OPERATION_PICK operation with the corresponding MIME type. To give options for pick operation, refer to the extras defined below.

      + + + + + + + + + +
      Note
      Tizen mobile platform provides this application control by default.
      +

      Operation

      +

      APP_CONTROL_OPERATION_PICK

      +

      URI

      +

      N/A

      +

      MIME Type (Optional)

      +

      */*

      +

      Extra Input

      + + + + + + + + + + + + + + + + + + + + + + + +
      KeyDescriptionNote
      APP_CONTROL_DATA_SELECTION_MODEThe selection mode of the PICK operation. The available values are single and multiple (single is the default, if not presented). This key must be passed as a string.This key is optional
      APP_CONTROL_DATA_TOTAL_COUNTThe total number of items to be returned. This key must be passed as a string.
      APP_CONTROL_DATA_TOTAL_SIZEThe total size of items to be returned in bytes. This key must be passed as a string.
      + +

      Extra Output

      + + + + + + + + + + + +
      KeyValue Description
      APP_CONTROL_DATA_SELECTEDThe list of selected file paths. This key must be passed as an array.
      +

      Example Code

      +
      +#include 
      +
      +app_control_h service;
      +app_control_create(&service);
      +
      +app_control_set_operation(service, APP_CONTROL_OPERATION_PICK);
      +app_control_add_extra_data(service, APP_CONTROL_ SELECTION_MODE, "single");
      +app_control_set_launch_mode(service, APP_CONTROL_LAUNCH_MODE_GROUP);
      +
      +app_control_send_launch_request(service, NULL, NULL);
      +
      + +

      Download a file

      + +

      To download a file, use the APP_CONTROL_OPERATION_DOWNLOAD operation and specify the URL in the URI.

      +

      Operation

      +

      APP_CONTROL_OPERATION_DOWNLOAD

      +

      To request this operation, the http://tizen.org/privilege/download privilege is needed since 2.4

      +

      URI

      +
        +
      • http:<path>
      • +
      • https:<path>
      • +
      +

      MIME Type

      +

      N/A

      +

      Extra Input

      +

      N/A

      +

      Extra Output

      +

      N/A

      +

      Example Code

      +
      +app_control_h app_control;
      +app_control_create(&app_control);
      +app_control_set_operation(app_control, APP_CONTROL_OPERATION_DOWNLOAD);
      +app_control_set_uri(app_control, "http://PATH_TO_FILE");
      +app_control_send_launch_request(app_control, NULL, NULL);
      +app_control_destroy(app_control);
      +
      +
      + + +

      Map

      Showing a Location on a Map

      @@ -1004,24 +1420,15 @@ app_control_destroy(service);
      • geo:latitude,longitude

        Show the map with 2 values that represent the latitude and longitude. For example: geo:50.1,-50.1

      • geo:0,0?q=keyword -

        Show the map at the location of a given keyword (address or POI). For example: geo:0,0?q="Eiffel Tower"

      • +

        Show the map at the location of a given keyword (address or POI). For example: geo:0,0?q=Eiffel%20Tower


        +

        All strings passed in the geo: URI must be encoded.

      +

      MIME Type

      +

      N/A

      Extra Input

      - - - - - - - - - - - - - -
      KeyDescriptionNote
      APP_CONTROL_DATA_TYPEThe type of the keyword, in case the URI contains a keyword. The available values are address and poi (poi is the default, if not presented).This key is mandatory only when the location URI is given as a keyword.
      - +

      N/A

      +

      Extra Output

      +

      N/A

      Example Code

       #include <app_control.h>
      @@ -1072,9 +1479,14 @@ show_maps_operation(void)
       
       

      Operation

      APP_CONTROL_OPERATION_PICK

      -

      URI (Optional)

      -

      geo:0,0?q=keyword

      -

      Show the map at the location of a given keyword (address or POI). For example: geo:0,0?q="Eiffel Tower"

      +

      URI (Mandatory)

      +
      • geo:0,0?q=keyword +

        If only "geo:" is used, it filters out all but map applications in the system, and you can use the extra data only to pass optional parameters.


        +

        Show the map at the location of a given keyword (address or POI). For example: geo:0,0?q=Eiffel%20Tower

        +

        All strings passed in the geo: URI must be encoded.

      • +
      +

      MIME Type

      +

      N/A

      Extra Input

      @@ -1085,7 +1497,7 @@ show_maps_operation(void) - + @@ -1166,16 +1578,18 @@ pick_reply_cb(app_control_h request, app_control_h reply, app_control_result_e r

      To compose a new message, use the APP_CONTROL_OPERATION_COMPOSE operation. To specify various message details, refer to the extras defined below.

      Figure: Composing a message

      -

      Composing a message

      +

      Composing a message

      Operation

      APP_CONTROL_OPERATION_COMPOSE

      -

      URI (Optional)

      +

      URI (Mandatory)

      • sms:<phone-number>

        For example: sms:+17913331234

      • mmsto:<phone-number>

        For example: mmsto:+17913331234

      +

      MIME Type

      +

      N/A

      Extra Input

      APP_CONTROL_DATA_TYPEThe type of the keyword. The available values are address and poi (poi is the default, if not presented).The type of items to be delivered. Available values are address, image, or all (address is default if not presented). This key MUST be passed as a string. This key is optional.
      @@ -1187,7 +1601,7 @@ pick_reply_cb(app_control_h request, app_control_h reply, app_control_result_e r - + @@ -1199,7 +1613,8 @@ pick_reply_cb(app_control_h request, app_control_h reply, app_control_result_e r
      APP_CONTROL_DATA_TO The phone numbers of recipients. This key must be passed as an array.This key is optional.This key is optional.
      APP_CONTROL_DATA_TEXT
      - +

      Extra Output

      +

      N/A

      Example Code

       #include <app_control.h>
      @@ -1208,31 +1623,33 @@ app_control_h service;
       app_control_create(&service);
       
       app_control_set_operation(service, APP_CONTROL_OPERATION_COMPOSE);
      -app_control_set_uri(service, "sms:123456789");         
      +app_control_set_uri(service, "mmsto:1234567890");         
       app_control_set_launch_mode(service, APP_CONTROL_LAUNCH_MODE_GROUP);
      +app_control_add_extra_data(service,APP_CONTROL_DATA_TEXT,"My text");
      +app_control_add_extra_data(service,APP_CONTROL_DATA_SUBJECT,"My subject");
       
       app_control_send_launch_request(service, NULL, NULL);
       
      -

      Sharing a Single Item in a Message

      +

      Sharing a Single Item using a Message

      -

      To share a single file in an MMS message, use the APP_CONTROL_OPERATION_SHARE operation.

      +

      To share a single item using an MMS message, use the APP_CONTROL_OPERATION_SHARE operation.

      Figure: Sharing a single item

      -

      Sharing a single item

      +

      Sharing a single item

      Operation

      APP_CONTROL_OPERATION_SHARE

      URI (Mandatory)

      -
      • mmsto:<phone-number> -

        For example: mmsto:+17913331234

      • +
        • mmsto: +

          Only an empty mmsto: field is allowed. This can be used to filter-out all message applications available in the system.

        • file:<path>

          For example: file://<media storage path>/item.jpg

        -

        MIME Type (Optional)

        +

        MIME Type

        Any MIME type that your application needs, such as image/jpg, video/*, or */*

        - +

        In case of sharing a single item through APP_CONTROL_DATA_PATH and URI specified with mmsto, MIME-type MUST be explicitly set.

        Extra Input

        @@ -1248,7 +1665,8 @@ app_control_send_launch_request(service, NULL, NULL);
        - +

        Extra Output

        +

        N/A

        Example Code

         #include <app_control.h>
        @@ -1263,9 +1681,9 @@ app_control_set_launch_mode(service, APP_CONTROL_LAUNCH_MODE_GROUP);
         app_control_send_launch_request(service, NULL, NULL);
         
        -

        Sharing Multiple Items in a Message

        +

        Sharing Multiple Items using a Message

        -

        To share multiple files in an MMS message, use the APP_CONTROL_OPERATION_MULTI_SHARE operation.

        +

        To share multiple items using an MMS message, use the APP_CONTROL_OPERATION_MULTI_SHARE operation.

        Figure: Sharing multiple items

        Sharing multiple items

        @@ -1273,12 +1691,12 @@ app_control_send_launch_request(service, NULL, NULL);

        Operation

        APP_CONTROL_OPERATION_MULTI_SHARE

        URI (Optional)

        -

        mmsto:<phone-number>

        -

        For example: mmsto:+17913331234

        +

        mmsto:

        +

        Only an empty mmsto: field is allowed. This can be used to filter-out all message applications available in the system.

        -

        MIME Type (Optional)

        +

        MIME Type (Mandatory)

        Any MIME type that your application needs, such as image/jpg, video/*, or */*

        - +

        If you try to share a set of files with different MIME types, use /* or */*. For example, if you send video/mp4 and audio/ogg, the MIME type MUST be */*.

        Extra Input

        @@ -1294,7 +1712,8 @@ app_control_send_launch_request(service, NULL, NULL);
        - +

        Extra Output

        +

        N/A

        Example Code

         #include <app_control.h>
        @@ -1305,6 +1724,7 @@ app_control_create(&service);
         const char* paths[] = {IMAGE_PATH1,IMAGE_PATH2};
         
         app_control_set_operation(service, APP_CONTROL_OPERATION_MULTI_SHARE);
        +app_control_set_uri(service,"mmsto:");
         app_control_add_extra_data_array(service, APP_CONTROL_DATA_PATH, paths, 2);
         app_control_set_launch_mode(service, APP_CONTROL_LAUNCH_MODE_GROUP);
         
        @@ -1316,15 +1736,14 @@ app_control_send_launch_request(service, NULL, NULL);
         

        To share any text with an SMS or MSM message, use the APP_CONTROL_OPERATION_SHARE_TEXT operation.

        Figure: Sharing text

        -

        Sharing text

        +

        Sharing text

        Operation

        APP_CONTROL_OPERATION_SHARE_TEXT

        -

        URI (Optional)

        -
        • sms:<phone-number> -

          For example: sms:+17913331234

        • -
        • mmsto:<phone-number> -

          For example: mmsto:+17913331234

        • +

          URI (Mandatory)

          +
          • sms:
          • +
          • mmsto:
          • +

            Only an empty sms: or mmsto: field is allowed. This can be used to filter-out all message applications available in the system.

          @@ -1344,7 +1763,7 @@ app_control_send_launch_request(service, NULL, NULL); APP_CONTROL_DATA_SUBJECT The subject of an MMS message. If it is set for an SMS message, the message is automatically converted to MMS. This key must be passed as a string. - This key is optional. + This key is optional. APP_CONTROL_DATA_PATH @@ -1361,13 +1780,322 @@ app_control_h service; app_control_create(&service); app_control_set_operation(service, APP_CONTROL_OPERATION_SHARE_TEXT); -app_control_add_extra_data(service, APP_CONTROL_DATA_TEXT, "How are you?"); -app_control_add_extra_data(service, APP_CONTROL_DATA_SUBJECT, "Hi"); +app_control_set_uri(service,"mmsto:"); +app_control_add_extra_data(service, APP_CONTROL_DATA_TEXT, "Hello, My name is Tizy."); +app_control_add_extra_data(service, APP_CONTROL_DATA_SUBJECT, "My subject"); app_control_set_launch_mode(service, APP_CONTROL_LAUNCH_MODE_GROUP); app_control_send_launch_request(service, NULL, NULL);
        +

        Multimedia

        +

        Play an audio/video file

        +

        You can play an audio/video file by using APP_CONTROL_OPERATION_VIEW operation with an URI. URI and MIME type are defined below. + + + + + + + + + +
        Note
        Tizen mobile platform provides this application control by default.
        +

        Operation

        +

        APP_CONTROL_OPERATION_VIEW

        +

        URI (Mandatory)

        +
          +
        • http:<path> +
        • https:<path> +
        • file:<path> +
        • rtsp:<path> +
        • rtp:<path> +
        + +

        MIME Type (Optional)

        +
          +
        • audio/* +
        • video/* +
        • text/x-iMelody +
        • application/vnd.apple.mpegurl +
        • application/x-mpegurl +
        • application/sdp +
        • application/ogg +
        • application/x-smaf +
        • application/vnd.smaf +
        + +

        Extra Input

        +

        N/A

        +

        Extra Output

        +

        N/A

        +

        Example Code

        +
        +#include 
        +#include 
        +
        +int play_audio_operation(const char* audio_uri)
        +{
        +   int ret = 0;
        +
        +   app_control_h service = NULL;
        +   app_control_create(&service);
        +   
        +   if (service == NULL)
        +   {
        +      dlog_print(DLOG_INFO, LOG_TAG, "service_create failed!\n");
        +      return -1;
        +   }
        +   
        +   app_control_set_operation(service, APP_CONTROL_OPERATION_VIEW);
        +   app_control_set_uri(service, audio_uri);
        +   ret = app_control_send_launch_request(service, NULL, NULL);
        +   app_control_destroy(service);
        +   
        +   if (ret == APP_CONTROL_ERROR_NONE)
        +   {
        +      dlog_print(DLOG_INFO, LOG_TAG, "Succeeded to request!\n");
        +      return 0;
        +   }
        +   else
        +   {
        +      dlog_print(DLOG_INFO, LOG_TAG, "Failed to request!\n");
        +      return -1;
        +   }
        +
        +   return 0;
        +}
        +
        +
        + +

        View an image file

        +

        You can display an image file by using APP_CONTROL_OPERATION_VIEW operation with an URI. URI and MIME type are defined below.

        + + + + + + + + + +
        Note
        Tizen mobile platform provides this application control by default.
        +

        Operation

        +

        APP_CONTROL_OPERATION_VIEW

        +

        URI (Mandatory)

        +
          +
        • http:<path> +
        • https:<path> +
        • file:<path> +
        + +

        MIME Type (Optional)

        +
          +
        • image/* +
        + +

        Extra Input

        +

        N/A

        +

        Extra Output

        +

        N/A

        +

        Example Code

        +
        +#include 
        +#include 
        +
        +int view_image_operation(const char* image_uri)
        +{
        +   int ret = 0;
        +
        +   app_control_h service = NULL;
        +   app_control_create(&service);
        +   
        +   if (service == NULL)
        +   {
        +      dlog_print(DLOG_INFO, LOG_TAG, "service_create failed!\n");
        +      return -1;
        +   }
        +   
        +   app_control_set_operation(service, APP_CONTROL_OPERATION_VIEW);
        +   app_control_set_uri(service, image_uri);
        +   ret = app_control_send_launch_request(service, NULL, NULL);
        +   app_control_destroy(service);
        +   
        +   if (ret == APP_CONTROL_ERROR_NONE)
        +   {
        +      dlog_print(DLOG_INFO, LOG_TAG, "Succeeded to request!\n");
        +      return 0;
        +   }
        +   else
        +   {
        +      dlog_print(DLOG_INFO, LOG_TAG, "Failed to request!\n");
        +      return -1;
        +   }
        +
        +   return 0;
        +}
        +
        + + +

        Retrieve a media file

        +

        You can retrieve a specific type of media file by using APP_CONTROL_OPERATION_PICK operation. URI, MIME type, and extra for input and output are defined below.

        + + + + + + + + + +
        Note
        Tizen mobile platform provides this application control by default.
        +

        Operation

        +

        APP_CONTROL_OPERATION_PICK

        +

        URI

        +

        N/A

        + +

        MIME Type (Optional)

        +
          +
        • audio/*
        • +
        • image/*
        • +
        • video/*
        • +
        + +

        Extra Input

        + + + + + + + + + + + + + + + + + + + + + + + +
        KeyDescriptionNote
        APP_CONTROL_DATA_SELECTION_MODEThe selection mode of the PICK operation. The available values are single and multiple (single is the default, if not presented). This key must be passed as a string.This key is optional
        APP_CONTROL_DATA_TOTAL_COUNTThe total number of items to be returned. This key must be passed as a string.This key is optional
        APP_CONTROL_DATA_TOTAL_SIZEThe total size of items to be returned in bytes. This key must be passed as a string.This key is optional
        + +

        Extra Output

        + + + + + + + + + + + +
        KeyValue Description
        APP_CONTROL_DATA_SELECTEDThe path(s) of the selected file(s). This key must be passed as an array.
        +

        Example Code

        +
        +#include 
        +#include 
        +
        +int retrieve_media_operation(const char* mime_type)
        +{
        +   int ret = 0;
        +
        +   app_control_h service = NULL;
        +   app_control_create(&service);
        +   
        +   if (service == NULL)
        +   {
        +      dlog_print(DLOG_INFO, LOG_TAG, "service_create failed!\n");
        +      return -1;
        +   }
        +   
        +   app_control_set_operation(service, APP_CONTROL_OPERATION_PICK);
        +   app_control_set_mime(service, mime_type);
        +   ret = app_control_send_launch_request(service, NULL, NULL);
        +   app_control_destroy(service);
        +   
        +   if (ret == APP_CONTROL_ERROR_NONE)
        +   {
        +      dlog_print(DLOG_INFO, LOG_TAG, "Succeeded to request!\n");
        +      return 0;
        +   }
        +   else
        +   {
        +      dlog_print(DLOG_INFO, LOG_TAG, "Failed to request!\n");
        +      return -1;
        +   }
        +
        +   return 0;
        +}
        +
        +
        + + +

        System Settings

        + +

        Showing System Settings

        + +

        To display various setting menus for, for example, Connections, Devices, and System Information, use the APP_CONTROL_OPERATION_SETTING operation.

        +

        Figure: Showing system settings

        +

        Showing system settings

        + +

        Operation

        +

        APP_CONTROL_OPERATION_SETTING

        +

        URI

        +

        N/A

        +

        MIME Type

        +

        N/A

        +

        Extra Input

        +

        N/A

        +

        Extra Output

        +

        N/A

        +

        Example Code

        +
        +int 
        +launch_setting(void)
        +{
        +   int ret = 0;
        +   app_control_h service = NULL;
        +   app_control_create(&service);
        + 
        +   if (service == NULL) 
        +   {
        +      dlog_print(DLOG_INFO, LOG_TAG, "Failed to create app control handler");
        +
        +      return -1;
        +   }
        + 
        +   app_control_set_operation(service, APP_CONTROL_OPERATION_SETTING);
        +
        +   ret = app_control_send_launch_request(service, NULL, NULL);
        +   app_control_destroy(service);
        + 
        +   if (ret == APP_CONTROL_ERROR_NONE) 
        +   {
        +      dlog_print(DLOG_INFO, LOG_TAG, "Succeeded to launch settings!\n");
        +
        +      return 0;
        +   } 
        +   else 
        +   {
        +      dlog_print(DLOG_INFO, LOG_TAG, "Failed to launch settings!\\n");
        +
        +      return -1;
        +   }
        +
        +   return 0;
        +}
        +
        +

        Settings for Bluetooth

        Showing Bluetooth Settings to Activate Bluetooth

        @@ -1375,11 +2103,18 @@ app_control_send_launch_request(service, NULL, NULL);

        To launch the Bluetooth setting application to allow the user to activate or deactivate Bluetooth, use the APP_CONTROL_OPERATION_SETTING_BT_ENABLE operation.

        Figure: Showing Bluetooth activation settings

        -

        Showing Bluetooth activation settings

        +

        Showing Bluetooth activation settings Showing Bluetooth activation settings

        Operation

        APP_CONTROL_OPERATION_SETTING_BT_ENABLE

        - +

        URI

        +

        N/A

        +

        MIME Type

        +

        N/A

        +

        Extra Input

        +

        N/A

        +

        Extra Output

        +

        N/A

        Example Code

        @@ -1425,11 +2160,18 @@ bt_enable_operation(void)
         
         

        To launch the Bluetooth setting application to allow the user to configure the visibility of the device, use the APP_CONTROL_OPERATION_SETTING_BT_VISIBILITY operation.

        -

        Showing location settings

        +

        Showing location settings

        Operation

        APP_CONTROL_OPERATION_SETTING_BT_VISIBILITY

        - +

        URI

        +

        N/A

        +

        MIME Type

        +

        N/A

        +

        Extra Input

        +

        N/A

        +

        Extra Output

        +

        N/A

        Example Code

        @@ -1478,11 +2220,18 @@ bt_visibility_operation(void)
         

        To launch the location setting application to allow the user to configure the source of the location information, use the APP_CONTROL_OPERATION_SETTING_LOCATION operation.

        If the location service is not active when an application tries to use the Location Manager (in mobile or wearable applications) or Geolocation APIs, an error occurs. To solve the problem, the application can try to launch the location setting application to let the user enable the location service. The user can activate the GPS, network positioning using the Wi-Fi Positioning System (WPS) and cellular network, or both.

        Figure: Showing location settings

        -

        Showing location settings

        +

        Showing location settings Showing location settings

        Operation

        APP_CONTROL_OPERATION_SETTING_LOCATION

        - +

        URI

        +

        N/A

        +

        MIME Type

        +

        N/A

        +

        Extra Input

        +

        N/A

        +

        Extra Output

        +

        N/A

        Example Code

        @@ -1528,11 +2277,18 @@ location_setting(void)
         
         

        To launch the NFC setting application to allow the user to activate or deactivate NFC, use the APP_CONTROL_OPERATION_SETTING_NFC operation.

        Figure: Showing NFC settings

        -

        Showing NFC settings

        +

        Showing NFC settings

        Operation

        APP_CONTROL_OPERATION_SETTING_NFC

        - +

        URI

        +

        N/A

        +

        MIME Type

        +

        N/A

        +

        Extra Input

        +

        N/A

        +

        Extra Output

        +

        N/A

        Example Code

        @@ -1582,11 +2338,18 @@ nfc_setting(void)
         
         

        To launch the Wi-Fi setting application to allow the user to activate and configure (or deactivate) Wi-Fi connections, use the APP_CONTROL_OPERATION_SETTING_WIFI operation.

        Figure: Showing Wi-Fi settings

        -

        Showing Wi-Fi settings

        +

        Showing Wi-Fi settings

        Operation

        APP_CONTROL_OPERATION_SETTING_WIFI

        - +

        URI

        +

        N/A

        +

        MIME Type

        +

        N/A

        +

        Extra Input

        +

        N/A

        +

        Extra Output

        +

        N/A

        Example Code

        @@ -1621,59 +2384,64 @@ wifi_launch_operation(void)
         }
         
        -

        System Settings

        +

        Voice Recorder

        -

        Showing System Settings

        +

        Record audio

        -

        To display various setting menus for, for example, Connections, Devices, and System Information, use the APP_CONTROL_OPERATION_SETTING operation.

        -

        Figure: Showing system settings

        -

        Showing system settings

        +

        To record audio, use the APP_CONTROL_OPERATION_CREATE_CONTENT operation with the audio MIME type. To give an option for recording audio, refer to the extras defined below.

        Operation

        -

        APP_CONTROL_OPERATION_SETTING

        +

        APP_CONTROL_OPERATION_CREATE_CONTENT

        +

        URI

        +

        N/A

        -

        Example Code

        -
        -int 
        -launch_setting(void)
        -{
        -   int ret = 0;
        -   app_control_h service = NULL;
        -   app_control_create(&service);
        - 
        -   if (service == NULL) 
        -   {
        -      dlog_print(DLOG_INFO, LOG_TAG, "Failed to create app control handler");
        -
        -      return -1;
        -   }
        - 
        -   app_control_set_operation(service, APP_CONTROL_OPERATION_SETTING);
        -
        -   ret = app_control_send_launch_request(service, NULL, NULL);
        -   app_control_destroy(service);
        - 
        -   if (ret == APP_CONTROL_ERROR_NONE) 
        -   {
        -      dlog_print(DLOG_INFO, LOG_TAG, "Succeeded to launch settings!\n");
        -
        -      return 0;
        -   } 
        -   else 
        -   {
        -      dlog_print(DLOG_INFO, LOG_TAG, "Failed to launch settings!\\n");
        +

        MIME Type (Mandatory)

        +

        Audio MIME-type such as audio/m4a, audio/ogg, and audio/*

        -      return -1; -   } +

        Extra Input

        + + + + + + + + + + + + + +
        KeyDescriptionNote
        APP_CONTROL_DATA_TOTAL_SIZEThe total size of items to be returned in bytes. This key must be passed as a string.This key is optional
        -   return 0; -} -
        +

        Extra Output

        + + + + + + + + + + + +
        KeyValue Description
        APP_CONTROL_DATA_SELECTEDThe path of the created audio file. This key must be passed as a string.
        + +
        +#include 
         
        +app_control_h service;
        +app_control_create(&service);
         
        +app_control_set_operation(service, APP_CONTROL_OPERATION_CREATE_CONTENT);
        +app_control_set_mime(service, “audio/m4a”);
        +app_control_set_launch_mode(service, APP_CONTROL_LAUNCH_MODE_GROUP);
         
        +app_control_send_launch_request(service, NULL, NULL);
         
        +