From ed0d445053453cf9641552e9582596c9dca78a01 Mon Sep 17 00:00:00 2001 From: "bg.chun" Date: Tue, 22 Sep 2015 09:59:57 +0900 Subject: [PATCH] [appcontrol] appcontrol doc for webapi Change-Id: Ic6d999f646f0271a834dcbe9eb05af5ae484e96d Signed-off-by: bg.chun --- .../web/tizen/application/common_appcontrol_w.htm | 2404 ++++++++++++++++++++ 1 file changed, 2404 insertions(+) create mode 100644 org.tizen.guides/html/web/tizen/application/common_appcontrol_w.htm diff --git a/org.tizen.guides/html/web/tizen/application/common_appcontrol_w.htm b/org.tizen.guides/html/web/tizen/application/common_appcontrol_w.htm new file mode 100644 index 0000000..ca4042e --- /dev/null +++ b/org.tizen.guides/html/web/tizen/application/common_appcontrol_w.htm @@ -0,0 +1,2404 @@ + + + + + + + + + + + + + Common Application Controls + + + + + +
+

Common Application Controls

+ +

The following sections introduce the common application controls.

+ +

Browser

+ +

Performing a Web Search

+ +

To find what you are looking for on the Web, use the http://tizen.org/appcontrol/operation/search operation.

+

Figure: Performing a Web search

+

Performing a Web search

+ +

Operation

+

http://tizen.org/appcontrol/operation/search

+

URI

+

N/A

+

MIME Type

+

N/A

+

Extra Input

+ + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/data/textThe text to search. This key must be passed as a string.This key is mandatory.
+

Extra Output

+

N/A

+

Example Code

+
+var appControlData = new tizen.ApplicationControlData(
+  "http://tizen.org/appcontrol/data/text", [ "tizen" ]);
+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/search",
+  null,
+  null,
+  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);
+
+ +

Loading a Web Page

+ +

To open a web page, use the http://tizen.org/appcontrol/operation/view operation and specify the Web URL in the URI.

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

Figure: Loading a Web page

+

Loading a Web page

+ +

Operation

+

http://tizen.org/appcontrol/operation/view

+

URI (Mandatory)

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

MIME Type (Optional)

+
    +
  • image/svg+xml
  • +
  • text/html
  • +
  • application/xml
  • +
  • application/xhtml+xml
  • +
  • text/plain
  • +
+

Extra Input

+

N/A

+

Extra Output

+

N/A

+

Example Code

+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/view",
+  "https://www.tizen.org",
+  null,
+  null,
+  null,
+  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);
+
+ +

Calendar

+ +

Adding a Calendar Event

+ +

To add a new event to the user's calendar, use the http://tizen.org/appcontrol/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

+ +

Operation

+

http://tizen.org/appcontrol/operation/add

+

URI

+

N/A

+

MIME Type (Mandatory)

+

application/vnd.tizen.calendar

+

Extra Input

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/data/calendar/all_dayThe 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.
http://tizen.org/appcontrol/data/calendar/start_timeThe start time of the event (format: YYYY-MM-DD HH:MM:SS). This key must be passed as a string.
http://tizen.org/appcontrol/data/calendar/end_timeThe end time of the event (format: YYYY-MM-DD HH:MM:SS). This key must be passed as a string.
http://tizen.org/appcontrol/data/titleThe title of the event. This key must be passed as a string.
http://tizen.org/appcontrol/data/textThe description of the event. This key must be passed as a string.
+

Extra Output

+ + + + + + + + + + + +
KeyDescription
http://tizen.org/appcontrol/data/idThe database record ID of the event (ID in the _calendar_event view). This key must be passed as a string.
+ +

Example Code

+
+var appControlData = [ new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/title", ["My event"]) ,
+                       new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/text", ["My event text"])
+       ];
+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/add",
+  null,
+  "application/vnd.tizen.calendar",
+  null,
+  appControlData,
+  "GROUP");
+
+tizen.application.launchAppControl(
+  appControl,
+  null,
+  function() { console.log("launch application control succeed"); },
+  function(e) { console.log("launch application control failed. reason: " + e.message); },
+  null);
+
+ +

Editing a Calendar Event

+ +

To edit an existing event in the user's calendar, use the http://tizen.org/appcontrol/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

+ +

Operation

+

http://tizen.org/appcontrol/operation/edit

+

URI

+

N/A

+

MIME Type (Mandatory)

+

application/vnd.tizen.calendar

+

Extra Input

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/data/idThe database record ID of the event (ID in the _calendar_event view). This key must be passed as a string.This key is mandatory.
http://tizen.org/appcontrol/data/calendar/all_dayThe 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.
http://tizen.org/appcontrol/data/calendar/start_timeThe start time of event (format: YYYY-MM-DD HH:MM:SS). This key must be passed as a string.
http://tizen.org/appcontrol/data/calendar/end_timeThe end time of event (format: YYYY-MM-DD HH:MM:SS). This key must be passed as a string.
http://tizen.org/appcontrol/data/titleThe title of event. This key must be passed as a string.
http://tizen.org/appcontrol/data/textThe description of event. This key must be passed as a string.
+

Extra Output

+ + + + + + + + + + + +
KeyDescription
http://tizen.org/appcontrol/data/idThe database record ID of the event (ID in the _calendar_event view). This key must be passed as a string.
+

Example Code

+
+var appControlData = [ new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/id", ["1"]) ,
+                       new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/title", ["Edited Title"]) ,
+                       new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/all_day", ["true"])
+       ];
+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/edit",
+  null,
+  "application/vnd.tizen.calendar",
+  null,
+  appControlData,
+  "GROUP");
+
+tizen.application.launchAppControl(
+  appControl,
+  null,
+  function() { console.log("launch application control succeed"); },
+  function(e) { console.log("launch application control failed. reason: " + e.message); },
+  null);
+
+ +

Viewing a Calendar Event

+ +

To display a specified event in the user's calendar, use the http://tizen.org/appcontrol/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 http://tizen.org/appcontrol/data/id.

+ +

Figure: Viewing a calendar event

+

Viewing a calendar event

+ +

Operation

+

http://tizen.org/appcontrol/operation/view

+

URI

+

file:<path>

+

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

+

MIME Type

+
    +
  • application/vnd.tizen.calendar +

    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.

    +
  • +
  • text/x-vcalendar (for vcalendar file)
  • +
  • text/vcalendar (for vcalendar file)
  • +
+

Extra Input

+ + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/data/idThe database record ID of the event (ID in the _calendar_event view). This key must be passed as a string.This key is mandatory when the MIME type is set to application/vnd.tizen.calendar.
+

Extra Input

+

N/A

+

Example Code

+
+// To view a calendar event from a vcs file
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/view",
+  "file://<app's shared path>/Calendar3.vcs",
+  null,
+  null,
+  null,
+  "GROUP");
+
+tizen.application.launchAppControl(
+  appControl,
+  null,
+  function() { console.log("launch application control succeed"); },
+  function(e) { console.log("launch application control failed. reason: " + e.message); },
+  null);
+
+// To view a calendar event from a calendar event ID
+var appControlData = [ new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/id", ["1"])];
+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/view",
+  null,
+  "application/vnd.tizen.calendar",
+  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);
+
+
+ +

Selecting a Calendar Event

+ +

To select a specified event in the user's calendar, use the http://tizen.org/appcontrol/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

+ +

Operation

+

http://tizen.org/appcontrol/operation/pick

+

URI

+

N/A

+

MIME Type (Mandatory)

+

application/vnd.tizen.calendar

+

Extra Input

+ + + + + + + + + + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/data/typeThe 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.
http://tizen.org/appcontrol/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.
http://tizen.org/appcontrol/data/total_countThe total number of events to be returned. This key must be passed as a string.
+

Extra Output

+ + + + + + + + + + + + + + + +
KeyDescription
http://tizen.org/appcontrol/data/typeThe type of items to be delivered. The available values are id and vcs. This key must be passed as a string.
http://tizen.org/appcontrol/data/selectedThe database record ID of the event (ID in the _calendar_event view) or the paths of the vcs files. This key must be passed as an array.
+

Example Code

+
+var appControlData = [ new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/type", ["id"]),
+                       new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/selection_mode", ["single"])
+                     ];
+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/pick",
+  null,
+  "application/vnd.tizen.calendar",
+  null,
+  appControlData,
+  "GROUP");
+
+tizen.application.launchAppControl(
+  appControl,
+  null,
+  function() { console.log("launch application control succeed"); },
+  function(e) { console.log("launch application control failed. reason: " + e.message); },
+  null);
+ +

Call

+ +

Making a Phone Call

+

To directly initiate a phone call, use the http://tizen.org/appcontrol/operation/call operation with a phone number URI scheme.

+

Figure: Making a phone call

+

Making a phone call

+ +

Operation

+

http://tizen.org/appcontrol/operation/call

+

To request this operation, the http://tizen.org/privilege/call privilege is needed.

+

URI (Mandatory)

+

tel:<number>

+

For example: tel:+821234567890

+

MIME Type

+

N/A

+

Extra Input

+

N/A

+

Extra Output

+

N/A

+

Code Example

+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/call",
+  "tel:0123456789",
+  null,
+  null,
+  null,
+  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);
+
+ + +

Launching a Call Application with a Phone Number

+ +

To open a call application and display a predefined a phone number, use the http://tizen.org/appcontrol/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

+ +

Operation

+

http://tizen.org/appcontrol/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

+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/dial",
+  "tel:0123456789",
+  null,
+  null,
+  null,
+  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);
+
+ + +

Camera

+ +

Capture a picture or video

+

To take picture or record video, use the http://tizen.org/appcontrol/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

+

http://tizen.org/appcontrol/operation/create_content

+

URI

+

N/A

+

MIME Type (Mandatory)

+

image/*

+

video/*

+ +

Extra Input

+ + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/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
http://tizen.org/appcontrol/data/selectedThe path of the created image or video file. This key must be passed as a string.
+

Example Code

+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/create_content",
+  null,
+  "image/*",
+  null,
+  null,
+  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);
+
+ +

Capture a picture

+

To capture still image, use the http://tizen.org/appcontrol/operation/image_capture operation. To specify an option, refer to the extras defined below.

+

Figure: Taking a picture

+

Taking picture

+

Operation

+

http://tizen.org/appcontrol/operation/image_capture

+

URI

+

N/A

+

MIME Type

+

N/A

+ +

Extra Input

+ + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/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
http://tizen.org/appcontrol/data/selectedThe path of the created file. This key must be passed as a string.
+

Example Code

+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/image_capture",
+  null,
+  null,
+  null,
+  null,
+  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);
+
+ +

Capture a video

+

To record video, use the http://tizen.org/appcontrol/operation/video_capture operation. To specify an option, refer to the extras defined below.

+

Figure: Record a video

+

Recording video

+

Operation

+

http://tizen.org/appcontrol/operation/video_capture

+

URI

+

N/A

+

MIME Type

+

N/A

+ +

Extra Input

+ + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/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
http://tizen.org/appcontrol/data/selectedThe path of the created file. This key must be passed as a string.
+

Example Code

+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/video_capture",
+  null,
+  null,
+  null,
+  null,
+  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);
+
+ +

Contact

+

Adding a Contact

+ +

To add a new contact, use the http://tizen.org/appcontrol/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

+ +

Operation

+

http://tizen.org/appcontrol/operation/add

+

URI

+

N/A

+

MIME Type (Mandatory)

+

application/vnd.tizen.contact

+

Extra Input

+ + + + + + + + + + + + + + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/data/phoneThe phone number. This key must be passed as a string.This key is optional.
http://tizen.org/appcontrol/data/emailThe email address. This key must be passed as a string.
http://tizen.org/appcontrol/data/urlThe homepage URL. This key must be passed as a string.
http://tizen.org/appcontrol/data/nameThe contact's name. This key must be passed as a string.
+

Extra Output

+ + + + + + + + + + + +
KeyDescription
http://tizen.org/appcontrol/data/idThe database record ID of the added person (ID in the _contacts_person view). This key must be passed as a string.
+

Example Code

+
+var appControlData = [ new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/phone", ["0123456789"]),
+                       new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/email", ["tizen@tizen.org"]),
+                       new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/name", ["Tizen User"])
+                     ];
+
+
+
+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/add",
+  null,
+  "application/vnd.tizen.contact",
+  null,
+  appControlData,
+  "GROUP");
+
+tizen.application.launchAppControl(
+  appControl,
+  null,
+  function() { console.log("launch application control succeed"); },
+  function(e) { console.log("launch application control failed. reason: " + e.message); },
+  null);
+
+ + +

Editing a Contact

+ +

To edit a known contact, use the http://tizen.org/appcontrol/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

+ +

Operation

+

http://tizen.org/appcontrol/operation/edit

+

URI

+

N/A

+

MIME Type (Mandatory)

+

application/vnd.tizen.contact

+

Extra Input

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/data/idThe database record ID of the person to be edited (ID in the _contacts_person view). This key must be passed as a string.This key is mandatory.
http://tizen.org/appcontrol/data/phoneThe phone number that is added to the contact. This key must be passed as a string.This key is optional.
http://tizen.org/appcontrol/data/emailThe email address that is added to the contact. This key must be passed as a string.
http://tizen.org/appcontrol/data/urlThe homepage URL that is added to the contact. This key must be passed as a string.
+ +

Extra Output

+ + + + + + + + + + + +
KeyDescription
http://tizen.org/appcontrol/data/idThe database record ID of the person to be edited (ID in the _contacts_person view). This key must be passed as a string.
+

Example Code

+
+var appControlData = [ new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/id", ["personId"]),
+                       new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/phone", ["0123456789"]),
+                       new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/email", ["2nd Email"])
+                     ];
+
+
+
+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/edit",
+  null,
+  "application/vnd.tizen.contact",
+  null,
+  appControlData,
+  "GROUP");
+
+tizen.application.launchAppControl(
+  appControl,
+  null,
+  function() { console.log("launch application control succeed"); },
+  function(e) { console.log("launch application control failed. reason: " + e.message); },
+  null);
+
+ +

Viewing a Contact

+ +

To display a specified contact in the contact database, use the http://tizen.org/appcontrol/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 http://tizen.org/appcontrol/data/id.

+ +

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

+

Viewing a contact Viewing a contact

+ +

Operation

+

http://tizen.org/appcontrol/operation/view

+

URI

+

file:<path>

+

MIME Type

+
    +
  • 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
  • +
+

Extra Input

+ + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/data/idThe database record ID of the edited person (ID in the _contacts_person view). This key must be passed as a string.This key is mandatory when the MIME type is set to application/vnd.tizen.contact.
+ +

Example Code

+
+function launchContactDetails(personId){
+ var appControlData = [ new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/id", ["personId"])];
+
+ var appControl = new tizen.ApplicationControl(
+   "http://tizen.org/appcontrol/operation/view",
+   null,
+   "application/vnd.tizen.contact",
+   null,
+   appControlData,
+   "GROUP");
+
+ tizen.application.launchAppControl(
+   appControl,
+   null,
+   function() { console.log("launch application control succeed"); },
+   function(e) { console.log("launch application control failed. reason: " + e.message); },
+   null);
+
+}
+
+function launchViewVcard(uri){
+ var appControl = new tizen.ApplicationControl(
+   "http://tizen.org/appcontrol/operation/view",
+   uri,
+   "text/vcard",
+   null,
+   null,
+   "GROUP");
+
+ tizen.application.launchAppControl(
+   appControl,
+   null,
+   function() { console.log("launch application control succeed"); },
+   function(e) { console.log("launch application control failed. reason: " + e.message); },
+   null);
+}
+
+ +

Selecting a Contact

+ +

To select a specified contact in the user's contacts, use the http://tizen.org/appcontrol/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

+ +

Operation

+

http://tizen.org/appcontrol/operation/pick

+

URI

+

N/A

+

MIME Type (Mandatory)

+

application/vnd.tizen.contact

+

Extra Input

+ + + + + + + + + + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/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.
http://tizen.org/appcontrol/data/typeThe 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.
http://tizen.org/appcontrol/data/total_countThe total number of events to be returned. This key must be passed as a string.
+

Extra Output

+ + + + + + + + + + + + + + + +
KeyDescription
http://tizen.org/appcontrol/data/typeThe type of items to be delivered. The available values are id, phone, email, and vcf. This key must be passed as a string.
http://tizen.org/appcontrol/data/selectedThe extra field to get the return information. The content of this key depends on its type: +
    +
  • id – The database record ID of the selected person (ID in the _contacts_person view).
  • +
  • phone – The database record ID of the number of the selected person (ID in the _contacts_number view).
  • +
  • email – The database record ID of the email of the selected person (ID in the _contacts_email view).
  • +
  • vcf – The path to the vCard file.
  • +
+

This key must be passed as an array.

+
+ +

Example Code

+
+function launchContactPick(selectionMode, dataType){
+
+ var appControlReplyCallback = {
+   onsuccess: function(data) {
+           for (var i = 0; i < data.length; i++) {
+            if(data[i].key == "http://tizen.org/appcontrol/data/type"){
+             console.log("type: " + data[i].value[0]);
+            }else if(data[i].key == "http://tizen.org/appcontrol/data/selected"){
+             console.log("result: " + data[i].value[0]);
+            }
+
+           }
+       },
+       onfailure: function() {
+           console.log('The launch application control failed');
+       }
+
+ }
+
+ var appControlData = [ new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/selection_mode", [selectionMode]),
+                        new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/type", [dataType])
+                      ];
+ var appControl = new tizen.ApplicationControl(
+     "http://tizen.org/appcontrol/operation/pick",
+     null,
+     "application/vnd.tizen.contact",
+     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); },
+     appControlReplyCallback );
+}
+
+ +

Sharing a Contact

+ +

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

+ +

Operation

+

http://tizen.org/appcontrol/operation/share

+

URI

+

N/A

+ +

MIME Type (Mandatory)

+

application/vnd.tizen.contact

+

Extra Input

+ + + + + + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/data/idThe DB record ID of the person (id in _contacts_person view) when http://tizen.org/appcontrol/data/type is set to person. + The DB record ID of the my profile (id in _contacts_my_profile view) when http://tizen.org/appcontrol/data/type is set to my_profile. This key MUST be passed as a string.

This key is mandatory.
http://tizen.org/appcontrol/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

+
+var appControlData = [ new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/type", ["persion"]),
+                       new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/id", ["persion_id"])
+                     ];
+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/share",
+  null,
+  "application/vnd.tizen.contact",
+  null,
+  appControlData,
+  "GROUP");
+
+tizen.application.launchAppControl(
+  appControl,
+  null,
+  function() { console.log("launch application control succeed"); },
+  function(e) { console.log("launch application control failed. reason: " + e.message); },
+  null);
+
+ +

Sharing Multiple Contacts

+ +

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

+ +

Operation

+

http://tizen.org/appcontrol/operation/multi_share

+

URI

+

N/A

+ +

MIME Type (Mandatory)

+

application/vnd.tizen.contact

+

Extra Input

+ + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/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

+
+var appControlData = [ new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/id", ["person_Id1", "person_Id2", "person_Id3"])];
+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/multi_share",
+  null,
+  "application/vnd.tizen.contact",
+  null,
+  appControlData,
+  "GROUP");
+
+tizen.application.launchAppControl(
+  appControl,
+  null,
+  function() { console.log("launch application control succeed"); },
+  function(e) { console.log("launch application control failed. reason: " + e.message); },
+  null);
+
+ +

Email

+ +

Composing an Email

+ +

To compose an email with optional recipients, subject, and body text, use the http://tizen.org/appcontrol/operation/compose operation.

+ +

Figure: Composing an email

+

Composing an email

+ +

Operation

+

http://tizen.org/appcontrol/operation/compose

+

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

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/data/toThe Email address of main recipient(s). This key MUST be passed as an array.This key is optional.
http://tizen.org/appcontrol/data/ccThe Email address of recipient(s) that should be carbon copied. This key MUST be passed as an array.
http://tizen.org/appcontrol/data/bccThe Email address of recipient(s) that should be blind carbon copied. This key MUST be passed as an array.
http://tizen.org/appcontrol/data/subjectThe subject of an email message. This key MUST be passed as a string.
http://tizen.org/appcontrol/data/textThe body of the email to be sent. This key MUST be passed as a string.
http://tizen.org/appcontrol/data/pathThe list of multiple file paths to be shared in an email message. This key must be passed as an array.
+

Extra Output

+

N/A

+

Example Code

+
+var appControlData = [ new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/cc", ["cc@tizen.org", "cc2@tizen.org"]),
+                       new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/bcc", ["bcc@tizen.org", "bcc2@tizen.org"]),
+                       new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/subject", ["test subject"]),
+                       new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/text", ["line1\nline2"])
+                      ];
+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/compose",
+  "mailto:to@tizen.org",
+  null,
+  null,
+  appControlData,
+  "GROUP");
+
+tizen.application.launchAppControl(
+  appControl,
+  null,
+  function() { console.log("launch application control succeed"); },
+  function(e) { console.log("launch application control failed. reason: " + e.message); },
+  null);
+
+ +

Sharing a Single File using an Email Message

+ +

To share a single file of any MIME type using an email message, use the http://tizen.org/appcontrol/operation/share operation.

+ +

Figure: Sharing a single file

+

Sharing a single file

+ +

Operation

+

http://tizen.org/appcontrol/operation/share

+

URI (Mandatory)

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

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

  • +
+ +

MIME Type

+

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

+

In case of sharing a single item through http://tizen.org/appcontrol/data/path and URI specified with mailto:, MIME-type MUST be explicitly set.

+

Extra Input

+ + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/data/pathWhen 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:.
+

Extra Output

+

N/A

+

Example Code

+
+var appControlData = [ new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/path", ["img_path"]) ];
+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/share",
+  "mailto:",
+  "image/*",
+  null,
+  appControlData,
+  "GROUP");
+
+tizen.application.launchAppControl(
+  appControl,
+  null,
+  function() { console.log("launch application control succeed"); },
+  function(e) { console.log("launch application control failed. reason: " + e.message); },
+  null);
+
+ +

Sharing Multiple Items using an Email Message

+ +

To share multiple files of any MIME type using an email message, use the http://tizen.org/appcontrol/operation/multi_share operation.

+ +

Figure: Sharing multiple items

+

Sharing multiple items

+ +

Operation

+

http://tizen.org/appcontrol/operation/multi_share

+

URI (Optional)

+

mailto:

+

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

+ +

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

+ + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/data/pathThe list of multiple file paths to be shared in an email message. This key must be passed as an array.This key is mandatory.
+

Extra Output

+

N/A

+

Example Code

+
+var appControlData = [ new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/path", ["img_path"]),
+                       new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/path", ["img_path"])
+                      ];
+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/multi_share",
+  "mailto:",
+  "image/*",
+  null,
+  appControlData,
+  "GROUP");
+
+tizen.application.launchAppControl(
+  appControl,
+  null,
+  function() { console.log("launch application control succeed"); },
+  function(e) { console.log("launch application control failed. reason: " + e.message); },
+  null);
+
+ +

Sharing Text in an Email

+ +

To share any text with an email message, use the http://tizen.org/appcontrol/operation/share_text operation. You can also define the message subject and a list of file attachments.

+ +

Figure: Sharing text

+

Sharing text

+ +

Operation

+

http://tizen.org/appcontrol/operation/share_text

+

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

+ + + + + + + + + + + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/data/textThe body of the message to be sent. This key must be passed as a string.This key is mandatory.
http://tizen.org/appcontrol/data/subjectThe subject of an email message. This key must be passed as a string.This key is optional.
http://tizen.org/appcontrol/data/pathThe list of multiple file paths to be shared using an email message. This key must be passed as an array.
+ +

Example Code

+
+var appControlData = [ new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/path", ["img_path"]),
+                       new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/subject", ["test subject"]),
+                       new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/text", ["line1\nline2"])
+                      ];
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/share_text",
+  "mailto:",
+  null,
+  null,
+  appControlData,
+  "GROUP");
+
+tizen.application.launchAppControl(
+  appControl,
+  null,
+  function() { console.log("launch application control succeed"); },
+  function(e) { console.log("launch application control failed. reason: " + e.message); },
+  null);
+
+ +

File Storage

+ +

Retrieve a specific type of file

+ +

To select any kind of file from the storage, use the http://tizen.org/appcontrol/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

+

http://tizen.org/appcontrol/operation/pick

+

URI

+

N/A

+

MIME Type (Optional)

+

*/*

+

Extra Input

+ + + + + + + + + + + + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/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
http://tizen.org/appcontrol/data/total_countThe total number of items to be returned. This key must be passed as a string.
http://tizen.org/appcontrol/data/total_sizeThe total size of items to be returned in bytes. This key must be passed as a string.
+ +

Extra Output

+ + + + + + + + + + + +
KeyValue Description
http://tizen.org/appcontrol/data/selectedThe list of selected file paths. This key must be passed as an array.
+

Example Code

+
+var appControlData = [ new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/selection_mode", ["single"]) ];
+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/pick",
+  null,
+  null,
+  null,
+  appControlData,
+  "GROUP");
+
+tizen.application.launchAppControl(
+  appControl,
+  null,
+  function() { console.log("launch application control succeed"); },
+  function(e) { console.log("launch application control failed. reason: " + e.message); },
+  null);
+
+ +

Download a file

+ +

To download a file, use the http://tizen.org/appcontrol/operation/download operation and specify the URL in the URI.

+

Operation

+

http://tizen.org/appcontrol/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

+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/download",
+  "https://img_path",
+  null,
+  null,
+  null,
+  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);
+
+ + + +

Map

+ +

Showing a Location on a Map

+ +

To open a map to show a location, use the http://tizen.org/appcontrol/operation/view operation with an URI. To specify various map details, refer to the extras defined below.

+ + +

Operation

+

http://tizen.org/appcontrol/operation/view

+

URI (Mandatory)

+
  • 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%20Tower


    +

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

    +

    If only "geo:" is used, it filters out all but map applications in the system, and the location to be shown depends on application scenario/configuration.

  • +
+

MIME Type

+

N/A

+

Extra Input

+

N/A

+

Extra Output

+

N/A

+

Example Code

+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/view",
+  "geo:50.1,-50.1",
+  null,
+  null,
+  null,
+  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);
+
+ +

Picking a Location from the Map

+ +

To pick a location from the map, use the http://tizen.org/appcontrol/operation/pick operation. To specify various map details, refer to the extras defined below.

+ + +

Operation

+

http://tizen.org/appcontrol/operation/pick

+

URI (Mandatory)

+
  • 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%20Tower


    +

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

    +

    If only "geo:" is used, it filters out all but map applications in the system, and the location to be shown depends on application scenario/configuration.

  • +
+

MIME Type

+

N/A

+

Extra Input

+ + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/data/typeThe 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.
+ +

Extra Output

+ + + + + + + + + + + + + + + +
KeyDescription
http://tizen.org/appcontrol/data/selectedThe address of the selected location. This key must be passed as a string.
http://tizen.org/appcontrol/data/pathThe file path of the image showing the selected location. This key must be passed as a string.
+ +

Example Code

+
+var appControlData = [ new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/type", ["poi"]) ];
+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/pick",
+  "geo:0,0?q=”Eiffel Tower",
+  null,
+  null,
+  null,
+  null);
+
+var appControlReplyCallback = {
+   onsuccess: function(data) {
+           for (var i = 0; i < data.length; i++) {
+             console.log("ret: " + data[i].key);
+             console.log("result: " + data[i].value[0]);
+           }
+       },
+   onfailure: function() {
+           console.log('The launch application control failed');
+       }
+ }
+
+tizen.application.launchAppControl(
+  appControl,
+  null,
+  function() { console.log("launch application control succeed"); },
+  function(e) { console.log("launch application control failed. reason: " + e.message); },
+  appControlReplyCallback);
+
+
+
+ +

Message

+ +

Composing a Message

+ +

To compose a new message, use the http://tizen.org/appcontrol/operation/compose operation. To specify various message details, refer to the extras defined below.

+ +

Figure: Composing a message

+

Composing a message

+ +

Operation

+

http://tizen.org/appcontrol/operation/compose

+

URI (Mandatory)

+
  • sms:<phone-number> +

    For example: sms:+17913331234

  • +
  • mmsto:<phone-number> +

    For example: mmsto:+17913331234

  • +
+

MIME Type

+

N/A

+

Extra Input

+ + + + + + + + + + + + + + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/data/toThe phone numbers of recipients. This key must be passed as an array.This key is optional.
http://tizen.org/appcontrol/data/textThe body of the message to be sent. This key must be passed as a string.
http://tizen.org/appcontrol/data/subjectThe subject of an MMS message. If this value is set for an SMS message, the message is automatically converted to MMS. This key must be passed as a string.
http://tizen.org/appcontrol/data/pathThe list of multiple file paths to be shared in a multimedia message. This key must be passed as an array.
+

Extra Output

+

N/A

+

Example Code

+
+var appControlData = [ new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/text", ["My text"]),
+                       new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/subject", ["My subject"])
+                      ];
+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/compose",
+  "mmsto:1234567890",
+  null,
+  null,
+  null,
+  "GROUP");
+
+tizen.application.launchAppControl(
+  appControl,
+  null,
+  function() { console.log("launch application control succeed"); },
+  function(e) { console.log("launch application control failed. reason: " + e.message); },
+  null);
+
+ +

Sharing a Single Item using a Message

+ +

To share a single item using an MMS message, use the http://tizen.org/appcontrol/operation/share operation.

+ +

Figure: Sharing a single item

+

Sharing a single item

+ +

Operation

+

http://tizen.org/appcontrol/operation/share

+

URI (Mandatory)

+
  • 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

+

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

+

In case of sharing a single item through http://tizen.org/appcontrol/data/path and URI specified with mmsto, MIME-type MUST be explicitly set.

+

Extra Input

+ + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/data/pathWhen the URI is set to mmsto, 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 mmsto.
+

Extra Output

+

N/A

+

Example Code

+
+var appControlData = [ new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/path", ["img_path"]) ];
+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/share",
+  null,
+  null,
+  null,
+  appControlData,
+  "GROUP");
+
+tizen.application.launchAppControl(
+  appControl,
+  null,
+  function() { console.log("launch application control succeed"); },
+  function(e) { console.log("launch application control failed. reason: " + e.message); },
+  null);
+
+ +

Sharing Multiple Items using a Message

+ +

To share multiple items using an MMS message, use the http://tizen.org/appcontrol/operation/multi_share operation.

+ +

Figure: Sharing multiple items

+

Sharing multiple items

+ +

Operation

+

http://tizen.org/appcontrol/operation/multi_share

+

URI (Optional)

+

mmsto:

+

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

+ +

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

+ + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/data/pathThe list of multiple file paths to be shared in a multimedia message. This key must be passed as an array.This key is mandatory.
+

Extra Output

+

N/A

+

Example Code

+
+var appControlData = [ new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/path", ["img_path"]),
+                       new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/path", ["img_path"])
+                      ];
+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/multi_share",
+  "mmsto:",
+  null,
+  null,
+  appControlData,
+  "GROUP");
+
+tizen.application.launchAppControl(
+  appControl,
+  null,
+  function() { console.log("launch application control succeed"); },
+  function(e) { console.log("launch application control failed. reason: " + e.message); },
+  null);
+
+ +

Sharing Text in a Message

+ +

To share any text with an SMS or MSM message, use the http://tizen.org/appcontrol/operation/share_text operation.

+ +

Figure: Sharing text

+

Sharing text

+ +

Operation

+

http://tizen.org/appcontrol/operation/share_text

+

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.

    +
+ + +

Extra Input

+ + + + + + + + + + + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/data/textThe body of the message to be sent. This key must be passed as a string.This key is mandatory.
http://tizen.org/appcontrol/data/subjectThe 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.
http://tizen.org/appcontrol/data/pathThe list of multiple file paths to be shared in a multimedia message. This key must be passed as an array.
+ +

Example Code

+
+var appControlData = [ new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/text", ["Hello, My name is Tizy."]),
+                       new tizen.ApplicationControlData( "http://tizen.org/appcontrol/data/subject", ["My subject"])
+                      ];
+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/share_text",
+  "mmsto:",
+  null,
+  null,
+  appControlData,
+  "GROUP");
+
+tizen.application.launchAppControl(
+  appControl,
+  null,
+  function() { console.log("launch application control succeed"); },
+  function(e) { console.log("launch application control failed. reason: " + e.message); },
+  null);
+
+ +

Multimedia

+

Play an audio/video file

+

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

Operation

+

http://tizen.org/appcontrol/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

+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/view",
+  "audio_uri",
+  null,
+  null,
+  null,
+  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);
+
+ +

View an image file

+

You can display an image file by using http://tizen.org/appcontrol/operation/view operation with an URI. URI and MIME type are defined below.

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

Operation

+

http://tizen.org/appcontrol/operation/view

+

URI (Mandatory)

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

MIME Type (Optional)

+
    +
  • image/* +
+ +

Extra Input

+

N/A

+

Extra Output

+

N/A

+

Example Code

+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/view",
+  "image_uri",
+  null,
+  null,
+  null,
+  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);
+
+ + +

Retrieve a media file

+

You can retrieve a specific type of media file by using http://tizen.org/appcontrol/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

+

http://tizen.org/appcontrol/operation/pick

+

URI

+

N/A

+ +

MIME Type (Optional)

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

Extra Input

+ + + + + + + + + + + + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/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
http://tizen.org/appcontrol/data/total_countThe total number of items to be returned. This key must be passed as a string.This key is optional
http://tizen.org/appcontrol/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
http://tizen.org/appcontrol/data/selectedThe path(s) of the selected file(s). This key must be passed as an array.
+

Example Code

+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/pick",
+  null,
+  "MIME_Type",
+  null,
+  null,
+  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);
+
+ + +

System Settings

+ +

Showing System Settings

+ +

To display various setting menus for, for example, Connections, Devices, and System Information, use the http://tizen.org/appcontrol/operation/setting operation.

+

Figure: Showing system settings

+

Showing system settings

+ +

Operation

+

http://tizen.org/appcontrol/operation/setting

+

URI

+

N/A

+

MIME Type

+

N/A

+

Extra Input

+

N/A

+

Extra Output

+

N/A

+

Example Code

+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/setting",
+  null,
+  null,
+  null,
+  null,
+  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);
+
+ +

Settings for Bluetooth

+ +

Showing Bluetooth Settings to Activate Bluetooth

+ +

To launch the Bluetooth setting application to allow the user to activate or deactivate Bluetooth, use the http://tizen.org/appcontrol/operation/setting/bt_enable operation.

+ +

Figure: Showing Bluetooth activation settings

+

Showing Bluetooth activation settings Showing Bluetooth activation settings

+ +

Operation

+

http://tizen.org/appcontrol/operation/setting/bt_enable

+

URI

+

N/A

+

MIME Type

+

N/A

+

Extra Input

+

N/A

+

Extra Output

+

N/A

+ +

Example Code

+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/setting/bt_enable",
+  null,
+  null,
+  null,
+  null,
+  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);
+
+ +

Showing Bluetooth Settings to Configure Visibility

+ +

To launch the Bluetooth setting application to allow the user to configure the visibility of the device, use the http://tizen.org/appcontrol/operation/setting/bt_visibility operation.

+ +

Showing location settings

+ +

Operation

+

http://tizen.org/appcontrol/operation/setting/bt_visibility

+

URI

+

N/A

+

MIME Type

+

N/A

+

Extra Input

+

N/A

+

Extra Output

+

N/A

+ +

Example Code

+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/setting/bt_visibility",
+  null,
+  null,
+  null,
+  null,
+  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);
+
+ +

Settings for Location

+ +

Showing Location Settings

+ +

To launch the location setting application to allow the user to configure the source of the location information, use the http://tizen.org/appcontrol/operation/setting/location operation.

+

If the location service is not active when an application tries to use the HumanActivityMonitor Manager (in mobile or wearable applications) 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

+ +

Operation

+

http://tizen.org/appcontrol/operation/setting/location

+

URI

+

N/A

+

MIME Type

+

N/A

+

Extra Input

+

N/A

+

Extra Output

+

N/A

+ +

Example Code

+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/setting/location",
+  null,
+  null,
+  null,
+  null,
+  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);
+
+ +

Settings for NFC

+ +

Showing NFC Settings

+ +

To launch the NFC setting application to allow the user to activate or deactivate NFC, use the http://tizen.org/appcontrol/operation/setting/nfc operation.

+

Figure: Showing NFC settings

+

Showing NFC settings

+ +

Operation

+

http://tizen.org/appcontrol/operation/setting/nfc

+

URI

+

N/A

+

MIME Type

+

N/A

+

Extra Input

+

N/A

+

Extra Output

+

N/A

+ +

Example Code

+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/setting/nfc",
+  null,
+  null,
+  null,
+  null,
+  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);
+
+ +

Settings for Wi-Fi

+ +

Showing Wi-Fi Settings

+ +

To launch the Wi-Fi setting application to allow the user to activate and configure (or deactivate) Wi-Fi connections, use the http://tizen.org/appcontrol/operation/setting/wifi operation.

+

Figure: Showing Wi-Fi settings

+

Showing Wi-Fi settings

+ +

Operation

+

http://tizen.org/appcontrol/operation/setting/wifi

+

URI

+

N/A

+

MIME Type

+

N/A

+

Extra Input

+

N/A

+

Extra Output

+

N/A

+ +

Example Code

+
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/setting/wifi",
+  null,
+  null,
+  null,
+  null,
+  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);
+
+ +

Voice Recorder

+ +

Record audio

+ +

To record audio, use the http://tizen.org/appcontrol/operation/create_content operation with the audio MIME type. To give an option for recording audio, refer to the extras defined below.

+ +

Operation

+

http://tizen.org/appcontrol/operation/create_content

+ +

URI

+

N/A

+ +

MIME Type (Mandatory)

+

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

+ +

Extra Input

+ + + + + + + + + + + + + +
KeyDescriptionNote
http://tizen.org/appcontrol/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
http://tizen.org/appcontrol/data/selectedThe path of the created audio file. This key must be passed as a string.
+ +
+var appControl = new tizen.ApplicationControl(
+  "http://tizen.org/appcontrol/operation/create_content",
+  null,
+  "audio/m4a",
+  null,
+  null,
+  "GROUP");
+
+tizen.application.launchAppControl(
+  appControl,
+  null,
+  function() { console.log("launch application control succeed"); },
+  function(e) { console.log("launch application control failed. reason: " + e.message); },
+  null);
+
+ + + + +
+ +Go to top + + + + + + + + -- 2.7.4