From 2c581f2674176d67523ae82c496d3905d086b57e Mon Sep 17 00:00:00 2001 From: Andrzej Popowski Date: Thu, 9 Jul 2015 10:00:35 +0200 Subject: [PATCH] [ApplicationGroup] - adding tutorial and programming guide Change-Id: Ieddea03f513cb4aefee419abcdd5f8e75d8cb0b7 Signed-off-by: Andrzej Popowski --- .../html/web/tizen/application/appgroup_w.htm | 88 +++++++++++++++ .../html/web/tizen/application/application_w.htm | 13 ++- org.tizen.guides/html/web/tizen/guides_tizen_w.htm | 2 +- .../html/web/tizen/application/app_tutorials_w.htm | 1 + .../web/tizen/application/appgroup_tutorial_w.htm | 125 +++++++++++++++++++++ 5 files changed, 227 insertions(+), 2 deletions(-) create mode 100644 org.tizen.guides/html/web/tizen/application/appgroup_w.htm create mode 100644 org.tizen.tutorials/html/web/tizen/application/appgroup_tutorial_w.htm diff --git a/org.tizen.guides/html/web/tizen/application/appgroup_w.htm b/org.tizen.guides/html/web/tizen/application/appgroup_w.htm new file mode 100644 index 0000000..4e4c2e5 --- /dev/null +++ b/org.tizen.guides/html/web/tizen/application/appgroup_w.htm @@ -0,0 +1,88 @@ + + + + + + + + + + + + + Application Group + + + + + +
+ +

Application Group

+

You can define the application launch mode and group your applications into entities that can be managed together.

+ +

The main features of the Application Group API include:

+
    +
  • Defining the application launch mode +

    You can set the application launch mode in the config.xml file with one of the following values: +

      +
    • The SINGLE launch mode means that the application is launched as a main application (in a new group).
    • +
    • The GROUP launch mode means that the application can be launched as a sub application + belonging to the same group as the caller application which is causing the application to be launched.
    • +
    +

    Additionally, if the launch mode is not set to the value SINGLE + in config.xml file and when the application is launched by the + launchAppControl() function + with the ApplicationControl object, + the launchMode property of this object overrides the launch mode of the called application. + If the launch mode in config.xml is set to SINGLE, + the value of that property ApplicationControl.launchMode + is ignored and the sub application is always called in SINGLE mode.

    +
  • +
  • Managing the application group +

    Applications in a same group act as if they are in 1 stack. For example, if an application A wants to send an email using an email application B, the application A can launch the email application B, making the email application B a sub application in the same group as the application A. When both applications are running, and the user presses the home button, both applications are hidden. When the user later resumes the caller application (application A), the email application B is shown on top of the caller application.

    +

    If an application is launched in a group, it can be terminated by the main (first) application in the group. If the main application is terminated or killed, the sub applications in the group are terminated automatically (they can be terminated by the framework even if they are hidden).

    + +

    Figure: Group behavior

    +

    Group behavior

    + +
  • +
+ + + + +
+ +Go to top + + + + + + + diff --git a/org.tizen.guides/html/web/tizen/application/application_w.htm b/org.tizen.guides/html/web/tizen/application/application_w.htm index f7ba1bf..c870047 100644 --- a/org.tizen.guides/html/web/tizen/application/application_w.htm +++ b/org.tizen.guides/html/web/tizen/application/application_w.htm @@ -368,6 +368,17 @@ tizen.application.findAppControl(appControl, function(appInfos, appCtrl)    } }, function(e) {/* Error handling */}); + +

Application Group

+

+ An application can be launched in a separate instance or in the same group as a calling application. The way how the application is called is determined by the launch mode. + There are two launch modes SINGLE + and GROUP. + For more information see Application Group +

+ + +

Exporting Application Control Functionality

The system compares the attributes of the application control request against the installed applications to determine which of the available applications is most suitable for the control request. The installed applications have a service description, which contains the information details on what the application can handle. The control request is resolved only if all specified information matches with the service description retrieved from the installed application. The application control data attribute is not used in resolving the control request.

@@ -442,4 +453,4 @@ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga - \ No newline at end of file + diff --git a/org.tizen.guides/html/web/tizen/guides_tizen_w.htm b/org.tizen.guides/html/web/tizen/guides_tizen_w.htm index 336a51c..076dcce 100644 --- a/org.tizen.guides/html/web/tizen/guides_tizen_w.htm +++ b/org.tizen.guides/html/web/tizen/guides_tizen_w.htm @@ -54,7 +54,7 @@
  • Tizen

    Enables you to handle generic events and sort and filter data.

  • Application -

    Enables you to configure application properties, and manage application data, packages, and alarms.

  • +

    Enables you to configure application properties, manage application data, packages, alarms and launch applications

  • Communication

    Enables you to send data to networks and other applications, and receive data back from them.

  • Content diff --git a/org.tizen.tutorials/html/web/tizen/application/app_tutorials_w.htm b/org.tizen.tutorials/html/web/tizen/application/app_tutorials_w.htm index 02511a8..62e4266 100644 --- a/org.tizen.tutorials/html/web/tizen/application/app_tutorials_w.htm +++ b/org.tizen.tutorials/html/web/tizen/application/app_tutorials_w.htm @@ -39,6 +39,7 @@
  • Alarm: Scheduling an Application to Be Launched at a Specific Time

    Demonstrates how you can manage alarms in the device.

  • Application: Providing Information about Applications and Controlling Applications

    Demonstrates how you can retrieve application information, receive application notifications, and perform application management actions.

  • Package: Providing Information about Package Installation and Installed Packages

    Demonstrates how you can retrieve package information, receive package notifications, and perform package management actions.

  • +
  • Application Group: Managing Groups

    Demonstrates how you can define the application launch mode and manage your applications in a group.

  • The following tutorials apply in mobile applications only:

    diff --git a/org.tizen.tutorials/html/web/tizen/application/appgroup_tutorial_w.htm b/org.tizen.tutorials/html/web/tizen/application/appgroup_tutorial_w.htm new file mode 100644 index 0000000..df8ce2f --- /dev/null +++ b/org.tizen.tutorials/html/web/tizen/application/appgroup_tutorial_w.htm @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + Application Group: Managing Groups + + + + + + +
    +

    Application Group: Managing Groups

    + +

    +This tutorial demonstrates how you can define the application launch mode and manage your applications in a group. +

    + +

    Warm-up

    +

    Become familiar with the Application Group API basics by learning about:

    + + + +

    Controlling the Launch Mode

    + + + + + + +

    To launch an application in a GROUP mode you must learn how to define the application control object and next how to launch the application:

    + +
      +
    1. Define the application control object with the mode GROUP: +
      +var appControl = new tizen.ApplicationControl(
      +                        "http://tizen.org/appcontrol/operation/view",
      +                        null,
      +                        "image/jpeg",
      +                        null,
      +                        [],
      +                        "GROUP");
      +
      +
    2. + +
    3. Define an array with callback functions for tizen.application.launchAppControl() method: +
      +var appControlReplyCallback = {
      +  // callee sent a reply 
      +  onsuccess: function(data) {
      +    console.log("onsuccess");
      +  },
      +  // callee returned failure
      +  onfailure: function() {
      +    console.log("onfailure");
      +  }
      +}
      +
      + +
    4. +
    5. Launch the application in the GROUP mode with the previously defined application control object: +
      +tizen.application.launchAppControl(
      +                      appControl,
      +                      null,
      +                      function() { console.log("launch application control succeed"); },
      +                      function(e) { console.log("launch application control failed. reason: " + e.message); },
      +                      appControlReplyCallback);
      +
      + +
    6. +
    + + + + +
    + +Go to top + + + + + + + -- 2.7.4