[ApplicationGroup] - adding tutorial and programming guide
authorAndrzej Popowski <a.popowski@samsung.com>
Thu, 9 Jul 2015 08:00:35 +0000 (10:00 +0200)
committerAndrzej Popowski <a.popowski@samsung.com>
Thu, 9 Jul 2015 09:04:46 +0000 (11:04 +0200)
Change-Id: Ieddea03f513cb4aefee419abcdd5f8e75d8cb0b7
Signed-off-by: Andrzej Popowski <a.popowski@samsung.com>
org.tizen.guides/html/web/tizen/application/appgroup_w.htm [new file with mode: 0644]
org.tizen.guides/html/web/tizen/application/application_w.htm
org.tizen.guides/html/web/tizen/guides_tizen_w.htm
org.tizen.tutorials/html/web/tizen/application/app_tutorials_w.htm
org.tizen.tutorials/html/web/tizen/application/appgroup_tutorial_w.htm [new file with mode: 0644]

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 (file)
index 0000000..4e4c2e5
--- /dev/null
@@ -0,0 +1,88 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\r
+<head>\r
+       <meta http-equiv="content-type" content="text/html; charset=utf-8"/>\r
+       <meta http-equiv="X-UA-Compatible" content="IE=9" />\r
+       <link rel="stylesheet" type="text/css" href="../../../css/styles.css" />\r
+       <link rel="stylesheet" type="text/css" href="../../../css/snippet.css" />\r
+       <script type="text/javascript" src="../../../scripts/snippet.js"></script>      \r
+       <script type="text/javascript" src="../../../scripts/jquery.util.js" charset="utf-8"></script>\r
+       <script type="text/javascript" src="../../../scripts/common.js" charset="utf-8"></script>\r
+       <script type="text/javascript" src="../../../scripts/core.js" charset="utf-8"></script>\r
+       <script type="text/javascript" src="../../../scripts/search.js" charset="utf-8"></script>\r
+  <title>Application Group</title> \r
+ </head> \r
+ <body onload="prettyPrint()" style="overflow: auto;">\r
\r
+ <div id="toc-navigation">\r
+       <div id="profile">\r
+               <p><img alt="Mobile native" src="../../images/mn_icon.png"/> <img alt="Wearable native" src="../../images/wn_icon.png"/></p>\r
+       </div>\r
+       \r
+       <div id="toc_border"><div id="toc">\r
+               <p class="toc-title">Related Info</p>\r
+               <ul class="toc">\r
+                       <li><a href="../../../../../org.tizen.tutorials/html/web/tizen/application/appgroup_tutorial_w.htm">Application Group Tutorial</a></li> \r
+                       <li><a href="../../../../../org.tizen.web.apireference/html/device_api/mobile/tizen/application.html">Application API for Mobile Web</a></li>\r
+                       <li><a href="../../../../../org.tizen.web.apireference/html/device_api/wearable/tizen/application.html">Application API for Wearable Web</a></li>\r
+                       </ul>\r
+       </div></div>\r
+</div>\r
+\r
+<div id="container"><div id="contents"><div class="content">\r
+\r
+<h1>Application Group</h1>\r
+<p>You can define the application launch mode and group your applications into entities that can be managed together.</p>\r
+\r
+  <p>The main features of the Application Group API include:</p>\r
+  <ul>\r
+       <li>Defining the application launch mode\r
+       <p>You can set the application launch mode in the <span style="font-family: Courier New,Courier,monospace">config.xml</span> file with one of the following values:\r
+               <ul>\r
+      <li>The <span style="font-family: Courier New,Courier,monospace">SINGLE</span> launch mode means that the application is launched as a main application (in a new group).</li>\r
+                 <li>The <span style="font-family: Courier New,Courier,monospace">GROUP</span> launch mode means that the application can be launched as a sub application\r
+      belonging to the same group as the caller application which is causing the application to be launched.</li>\r
+    </ul>\r
+       <p>Additionally, if the launch mode is not set to the value <span style="font-family: Courier New,Courier,monospace">SINGLE</span>\r
+  in <span style="font-family: Courier New,Courier,monospace">config.xml</span> file and when the application is launched by the\r
+  <a href ="../../../../../org.tizen.web.apireference/html/device_api/mobile/tizen/application.html#ApplicationManager::launchAppControl">launchAppControl()</a> function\r
+  with the <a href="../../../../../org.tizen.web.apireference/html/device_api/mobile/tizen/application.html#ApplicationControl">ApplicationControl</a> object,\r
+  the <span style="font-family: Courier New,Courier,monospace">launchMode</span> property of this object overrides the launch mode of the called application.\r
+  If the launch mode in config.xml is set to <span style="font-family: Courier New,Courier,monospace">SINGLE</span>,\r
+  the value of that property <span style="font-family: Courier New,Courier,monospace">ApplicationControl.launchMode</span>\r
+  is ignored and the sub application is always called in <span style="font-family: Courier New,Courier,monospace">SINGLE</span> mode.</p>\r
+       </li>\r
+       <li>Managing the application group\r
+       <p>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.</p>\r
+       <p>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).</p>\r
+\r
+       <p class="figure">Figure: Group behavior</p> \r
+<p align="center"><img alt="Group behavior" src="../../../images/app_group_behavior.png" /></p> \r
+       \r
+       </li>\r
+</ul>\r
+\r
+\r
+<script type="text/javascript" src="../../../scripts/jquery.zclip.min.js"></script>\r
+<script type="text/javascript" src="../../../scripts/showhide.js"></script>\r
+</div></div></div>\r
+\r
+<a class="top sms" href="#"><img src="../../../images/btn_top.gif" alt="Go to top" /></a>\r
+\r
+<div id="footer">\r
+<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>\r
+</div>\r
+\r
+<script type="text/javascript">\r
+var _gaq = _gaq || [];\r
+_gaq.push(['_setAccount', 'UA-25976949-1']);\r
+_gaq.push(['_trackPageview']);\r
+(function() {\r
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\r
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\r
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\r
+})();\r
+</script>\r
+\r
+</body>\r
+</html>        \r
index f7ba1bf..c870047 100644 (file)
@@ -368,6 +368,17 @@ tizen.application.findAppControl(appControl, function(appInfos, appCtrl)
 &nbsp;&nbsp;&nbsp;}
 }, function(e) {/* Error handling */});</pre>  
 
+
+  <h3 id="app_group" name="app_group">Application Group</h3>
+  <p>
+  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 <span style="font-family: Courier New,Courier,monospace">SINGLE</span>
+  and <span style="font-family: Courier New,Courier,monospace">GROUP</span>.
+  For more information see <a href="./appgroup_w.htm">Application Group</a>
+  </p>
+
+
+
        <h2 id="exporting" name="exporting">Exporting Application Control Functionality</h2> 
   
   <p>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 <span style="font-family: Courier New,Courier,monospace">data</span> attribute is not used in resolving the control request.</p>
@@ -442,4 +453,4 @@ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga
 </script>
 
 </body>
-</html>
\ No newline at end of file
+</html>
index 336a51c..076dcce 100644 (file)
@@ -54,7 +54,7 @@
        <li><a href="tizen/tizen_guide_w.htm">Tizen</a>
        <p>Enables you to handle generic events and sort and filter data.</p></li>
        <li><a href="application/app_guide_w.htm">Application</a>
-       <p>Enables you to configure application properties, and manage application data, packages, and alarms.</p></li>
+       <p>Enables you to configure application properties, manage application data, packages, alarms and launch applications</p></li>
        <li><a href="communication/comm_guide_w.htm">Communication</a>
        <p>Enables you to send data to networks and other applications, and receive data back from them.</p></li>
        <li><a href="content/content_guide_w.htm">Content</a>
index 02511a8..62e4266 100644 (file)
@@ -39,6 +39,7 @@
     <li><a href="alarm_tutorial_w.htm">Alarm: Scheduling an Application to Be Launched at a Specific Time</a> <p>Demonstrates how you can manage alarms in the device.</p></li>
        <li><a href="application_tutorial_w.htm">Application: Providing Information about Applications and Controlling Applications</a> <p>Demonstrates how you can retrieve application information, receive application notifications, and perform application management actions.</p></li>
    <li><a href="package_tutorial_w.htm">Package: Providing Information about Package Installation and Installed Packages</a> <p>Demonstrates how you can retrieve package information, receive package notifications, and perform package management actions.</p></li> 
+   <li><a href="appgroup_tutorial_w.htm">Application Group: Managing Groups</a> <p>Demonstrates how you can define the application launch mode and manage your applications in a group.</p></li> 
   </ul> 
   
 <p>The following tutorials apply in <strong>mobile applications only</strong>:</p>     
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 (file)
index 0000000..df8ce2f
--- /dev/null
@@ -0,0 +1,125 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+    <meta http-equiv="X-UA-Compatible" content="IE=9" />
+    <link rel="stylesheet" type="text/css" href="../../../css/styles.css" />
+    <link rel="stylesheet" type="text/css" href="../../../css/snippet.css" />
+    <script type="text/javascript" src="../../../scripts/snippet.js"></script>
+    <script type="text/javascript" src="../../../scripts/jquery.util.js" charset="utf-8"></script>
+    <script type="text/javascript" src="../../../scripts/common.js" charset="utf-8"></script>
+    <script type="text/javascript" src="../../../scripts/core.js" charset="utf-8"></script>
+    <script type="text/javascript" src="../../../scripts/search.js" charset="utf-8"></script>
+
+    <title>Application Group: Managing Groups</title>
+</head>
+
+<body onload="prettyPrint()" style="overflow: auto;">
+
+<div id="toc-navigation">
+    <div id="profile">
+        <p><img alt="Mobile Web" src="../../../images/mw_icon.png"/> <img alt="Wearable Web" src="../../../images/ww_icon.png"/></p>
+    </div>
+    <div id="toc_border"><div id="toc">
+        <p class="toc-title">Content</p>
+        <ul class="toc">
+            <li><a href="#mode">Controlling the Launch Mode</a></li>
+        </ul>
+        <p class="toc-title">Related Info</p>
+        <ul class="toc">
+            <li><a href="../../../../../org.tizen.guides/html/web/tizen/application/appgroup_w.htm">Application Group Guide</a></li>
+            <li><a href="../../../../../org.tizen.web.apireference/html/device_api/mobile/tizen/application.html">Application API for Mobile Web</a></li>
+            <li><a href="../../../../../org.tizen.web.apireference/html/device_api/wearable/tizen/application.html">Application API for Wearable Web</a></li>
+        </ul>
+    </div></div>
+</div>
+
+<div id="container"><div id="contents"><div class="content">
+<h1>Application Group: Managing Groups</h1>
+
+<p>
+This tutorial demonstrates how you can define the application launch mode and manage your applications in a group.
+</p>
+
+<h2>Warm-up</h2>
+<p>Become familiar with the Application Group API basics by learning about:</p>
+<ul>
+  <li><a href="#mode">Controlling the Launch Mode</a>
+    <p>Set the launch mode when calling an application through an app control.</p></li>
+</ul>
+
+
+<h2 id="mode" name="mode">Controlling the Launch Mode</h2>
+
+
+
+
+
+
+<p>To launch an application in a <span style="font-family: Courier New,Courier,monospace">GROUP</span> mode you must learn how to define the application control object and next how to launch the application:</p>
+
+<ol>
+<li>Define the application control object with the mode <span style="font-family: Courier New,Courier,monospace">GROUP</span>:
+<pre class="prettyprint">
+var appControl = new tizen.ApplicationControl(
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"http://tizen.org/appcontrol/operation/view",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"image/jpeg",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[],
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"GROUP");
+</pre>
+</li>
+
+<li>Define an array with callback functions for <span style="font-family: Courier New,Courier,monospace">tizen.application.launchAppControl()</span> method:
+<pre class="prettyprint">
+var appControlReplyCallback = {
+&nbsp;&nbsp;// callee sent a reply 
+&nbsp;&nbsp;onsuccess: function(data) {
+&nbsp;&nbsp;&nbsp;&nbsp;console.log("onsuccess");
+&nbsp;&nbsp;},
+&nbsp;&nbsp;// callee returned failure
+&nbsp;&nbsp;onfailure: function() {
+&nbsp;&nbsp;&nbsp;&nbsp;console.log("onfailure");
+&nbsp;&nbsp;}
+}
+</pre>
+
+</li>
+<li>Launch the application in the <span style="font-family: Courier New,Courier,monospace">GROUP</span> mode with the previously defined application control object:
+<pre class="prettyprint">
+tizen.application.launchAppControl(
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appControl,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() { console.log("launch application control succeed"); },
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function(e) { console.log("launch application control failed. reason: " + e.message); },
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appControlReplyCallback);
+</pre>
+
+</li>
+</ol>
+
+<script type="text/javascript" src="../../../scripts/jquery.zclip.min.js"></script>
+<script type="text/javascript" src="../../../scripts/showhide.js"></script>
+
+</div></div></div>
+
+<a class="top sms" href="#"><img src="../../../images/btn_top.gif" alt="Go to top" /></a>
+
+<div id="footer">
+<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+</div>
+
+<script type="text/javascript">
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-25976949-1']);
+_gaq.push(['_trackPageview']);
+(function() {
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+
+</body>
+</html>