Add tutorial and guide for feedback
authorpr.jung <pr.jung@samsung.com>
Mon, 28 Dec 2015 02:05:15 +0000 (11:05 +0900)
committerpr.jung <pr.jung@samsung.com>
Mon, 28 Dec 2015 02:24:09 +0000 (11:24 +0900)
Change-Id: Iab197124bcf58738d1b042b47b5e5552133481ae
Signed-off-by: pr.jung <pr.jung@samsung.com>
org.tizen.guides/html/native/system/feedback_n.htm [new file with mode: 0644]
org.tizen.guides/html/native/system/storage_n.htm
org.tizen.tutorials/html/native/system/feedback_tutorial_n.htm [new file with mode: 0644]

diff --git a/org.tizen.guides/html/native/system/feedback_n.htm b/org.tizen.guides/html/native/system/feedback_n.htm
new file mode 100644 (file)
index 0000000..690af18
--- /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
+\r
+       <title>Feedback</title>\r
+</head>\r
+\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/mobile_s_n.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/native/system/feedback_tutorial_n.htm">Feedback Tutorial</a></li>\r
+                       <li><a href="../../../../org.tizen.native.mobile.apireference/group__CAPI__SYSTEM__FEEDBACK__MODULE.html">Feedback API for Mobile Native</a></li>\r
+               </ul>\r
+       </div></div>\r
+</div>\r
+\r
+<div id="container"><div id="contents"><div class="content">\r
+<h1>Feedback</h1>\r
+\r
+  <p>Tizen enables you to play feedback pattern.</p>\r
+  <p>There is Feedback API to play feedback as feedback types and patterns. </p>\r
+  <table border="1" style="width: 100%">\r
+   <caption>\r
+     Table: Feedback Types\r
+   </caption>\r
+   <tbody>\r
+    <tr>\r
+     <th>Enum</th>\r
+     <th>Description</th>\r
+    </tr>\r
+    <tr>\r
+     <td><span style="font-family: Courier New,Courier,monospace">FEEDBACK_TYPE_SOUND</span></td>\r
+     <td>Sound type</td>\r
+    </tr>\r
+    <tr>\r
+     <td><span style="font-family: Courier New,Courier,monospace">FEEDBACK_TYPE_VIBRATION</span></td>\r
+     <td>Vibration type</td>\r
+    </tr>\r
+   </tbody>\r
+  </table>\r
+  <p>The main features of the Feedback API include:</p>\r
+  <ul>\r
+   <li>Sound management <p>Feedback API requests to play sound to sound-server by using mm-keysound library.</p> <p>You can feedback by sound using the <span style="font-family: Courier New,Courier,monospace">feedback_play(pattern)</span> or <span style="font-family: Courier New,Courier,monospace">feedback_play_type(FEEDBACK_TYPE_SOUND, pattern)</span> function.</p>\r
+   </li>\r
+   <li>Vibration management\r
+   <p>Feedback API requests to vibrate to deviced by using dbus method call. As per vibration data type on vibration.conf, it requests haptic monotone or haptic effect to deviced.</p> <p>You can feedback by vibration using the <span style="font-family: Courier New,Courier,monospace">feedback_play(pattern)</span> or <span style="font-family: Courier New,Courier,monospace">feedback_play_type(FEEDBACK_TYPE_VIBRATION, pattern)</span> function.</p></li></ul>\r
+\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 aed0d65..d75348e 100644 (file)
@@ -5,13 +5,13 @@
        <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/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
 \r
-       <title>Storage</title>  \r
+       <title>Storage</title>\r
 </head>\r
 \r
 <body onload="prettyPrint()" style="overflow: auto;">\r
        <div id="profile">\r
                <p><img alt="Mobile native" src="../../images/mobile_s_n.png"/> <img alt="Wearable native" src="../../images/wearable_s_n.png"/></p>\r
        </div>\r
-       \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/native/system/storage_tutorial_n.htm">Storage Tutorial</a></li>       \r
+                       <li><a href="../../../../org.tizen.tutorials/html/native/system/storage_tutorial_n.htm">Storage Tutorial</a></li>\r
                        <li><a href="../../../../org.tizen.native.mobile.apireference/group__CAPI__SYSTEM__STORAGE__MODULE.html">Storage API for Mobile Native</a></li>\r
                        <li><a href="../../../../org.tizen.native.wearable.apireference/group__CAPI__SYSTEM__STORAGE__MODULE.html">Storage API for Wearable Native</a></li>\r
                </ul>\r
        </div></div>\r
-</div> \r
+</div>\r
 \r
 <div id="container"><div id="contents"><div class="content">\r
 <h1>Storage</h1>\r
 \r
-  <p>Tizen enables you to get storage information and manage directories.</p> \r
-  <p>The Storage API provides access to accessible parts of the file system, which are represented as virtual root locations. The virtual roots form a collection of locations that function as a single virtual device file system. The following table lists the supported virtual roots.</p> \r
-  <table border="1" style="width: 100%"> \r
+  <p>Tizen enables you to get storage information and manage directories.</p>\r
+  <p>The Storage API provides access to accessible parts of the file system, which are represented as virtual root locations. The virtual roots form a collection of locations that function as a single virtual device file system. The following table lists the supported virtual roots.</p>\r
+  <table border="1" style="width: 100%">\r
    <caption>\r
-     Table: Filesystem virtual roots \r
-   </caption> \r
-   <tbody> \r
-    <tr> \r
-     <th>Virtual root</th> \r
-     <th>Description</th> \r
-    </tr> \r
-    <tr> \r
-     <td><span style="font-family: Courier New,Courier,monospace">images</span></td> \r
-     <td>Location for storing images.</td> \r
-    </tr> \r
-    <tr> \r
-     <td><span style="font-family: Courier New,Courier,monospace">sounds</span></td> \r
-     <td>Location for storing sound files.</td> \r
-    </tr>      \r
-    <tr> \r
-     <td><span style="font-family: Courier New,Courier,monospace">videos</span></td> \r
-     <td>Location for storing videos.</td> \r
-    </tr> \r
-    <tr> \r
-     <td><span style="font-family: Courier New,Courier,monospace">camera</span></td> \r
-     <td>Location for storing camera files.</td> \r
-    </tr>      \r
-    <tr> \r
-     <td><span style="font-family: Courier New,Courier,monospace">downloads</span></td> \r
-     <td>Location for storing downloaded items.</td> \r
-    </tr>      \r
-    <tr> \r
-     <td><span style="font-family: Courier New,Courier,monospace">music</span></td> \r
-     <td>Location for storing audio files.</td> \r
-    </tr> \r
-    <tr> \r
-     <td><span style="font-family: Courier New,Courier,monospace">documents</span></td> \r
-     <td>Location for storing documents.</td> \r
-    </tr>      \r
-    <tr> \r
-     <td><span style="font-family: Courier New,Courier,monospace">others</span></td> \r
-     <td>Location for storing other files.</td> \r
-    </tr> \r
-       <tr> \r
-     <td><span style="font-family: Courier New,Courier,monospace">ringtones</span></td> \r
-     <td>Location for ringtones (read-only location).</td> \r
-    </tr>      \r
-   </tbody> \r
-  </table> \r
-  <p>The main features of the Storage API include:</p> \r
-  <ul> \r
+     Table: Filesystem virtual roots\r
+   </caption>\r
+   <tbody>\r
+    <tr>\r
+     <th>Virtual root</th>\r
+     <th>Description</th>\r
+    </tr>\r
+    <tr>\r
+     <td><span style="font-family: Courier New,Courier,monospace">images</span></td>\r
+     <td>Location for storing images.</td>\r
+    </tr>\r
+    <tr>\r
+     <td><span style="font-family: Courier New,Courier,monospace">sounds</span></td>\r
+     <td>Location for storing sound files.</td>\r
+    </tr>\r
+    <tr>\r
+     <td><span style="font-family: Courier New,Courier,monospace">videos</span></td>\r
+     <td>Location for storing video files.</td>\r
+    </tr>\r
+    <tr>\r
+     <td><span style="font-family: Courier New,Courier,monospace">camera</span></td>\r
+     <td>Location for storing photos.</td>\r
+    </tr>\r
+    <tr>\r
+     <td><span style="font-family: Courier New,Courier,monospace">downloads</span></td>\r
+     <td>Location for storing downloaded items.</td>\r
+    </tr>\r
+    <tr>\r
+     <td><span style="font-family: Courier New,Courier,monospace">music</span></td>\r
+     <td>Location for storing audio files.</td>\r
+    </tr>\r
+    <tr>\r
+     <td><span style="font-family: Courier New,Courier,monospace">documents</span></td>\r
+     <td>Location for storing documents.</td>\r
+    </tr>\r
+    <tr>\r
+     <td><span style="font-family: Courier New,Courier,monospace">others</span></td>\r
+     <td>Location for storing other files.</td>\r
+    </tr>\r
+       <tr>\r
+     <td><span style="font-family: Courier New,Courier,monospace">ringtones</span></td>\r
+     <td>Location for ringtones (read-only location).</td>\r
+    </tr>\r
+   </tbody>\r
+  </table>\r
+  <p>The main features of the Storage API include:</p>\r
+  <ul>\r
    <li>Storage management <p>You can manage different storages on the device with the Storage APIs.</p> <p>You can retrieve additional information about the storages, including which storage is supported in the device using the <span style="font-family: Courier New,Courier,monospace">storage_foreach_device_supported()</span> function. The callback function returns the storage type, mount state, and virtual root path.</p>\r
-   </li> \r
-   <li>Storage space management \r
+   </li>\r
+   <li>Storage space management\r
    <p>You can get the available and total space size of the storage with the  <span style="font-family: Courier New,Courier,monospace">storage_get_total_space()</span> and <span style="font-family: Courier New,Courier,monospace">storage_get_available_space()</span> functions. They return the storage size, excluding the minimum memory size to launch the low memory pop-up in case of a low memory situation. Consequently, the available size must be less than the original available size, and you must use these functions to get the memory size. For the same reason, you cannot use the <span style="font-family: Courier New,Courier,monospace">statvfs</span> function directly in Tizen. Instead, use <span style="font-family: Courier New,Courier,monospace">storage_get_internal_memory_size()</span> and <span style="font-family: Courier New,Courier,monospace">storage_get_external_memory_size()</span>. The Statvfs structure has a different structure size defined by &quot;__USE_FILE_OFFSET64&quot;. However, you can ignore this, since the Storage API uses a proper function automatically.</p></li></ul>\r
-  \r
+\r
 \r
 \r
 <script type="text/javascript" src="../../scripts/jquery.zclip.min.js"></script>\r
@@ -114,4 +114,4 @@ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga
 </script>\r
 \r
 </body>\r
-</html>
\ No newline at end of file
+</html>\r
diff --git a/org.tizen.tutorials/html/native/system/feedback_tutorial_n.htm b/org.tizen.tutorials/html/native/system/feedback_tutorial_n.htm
new file mode 100644 (file)
index 0000000..4f1d060
--- /dev/null
@@ -0,0 +1,149 @@
+<!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>Feedback: Playing Sound and Vibrate Patterns</title>
+</head>
+
+<body onload="prettyPrint()" style="overflow: auto;">
+
+<div id="toc-navigation">
+       <div id="profile">
+               <p><img alt="Mobile native" src="../../images/mobile_s_n.png"/></p>
+       </div>
+       <div id="toc_border"><div id="toc">
+               <p class="toc-title">Content</p>
+               <ul class="toc">
+                       <li><a href="#play">Playing Feedback for Specific Pattern</a></li>
+                       <li><a href="#playtype">Playing Feedback for Specific Type and Pattern</a></li>
+                       <li><a href="#support">Checking whether Pattern is Supported</a></li>
+               </ul>
+               <p class="toc-title">Related Info</p>
+               <ul class="toc">
+               <li><a href="../../../../org.tizen.guides/html/native/system/feedback_n.htm">Feedback Guide</a></li>
+                       <li><a href="../../../../org.tizen.native.mobile.apireference/group__CAPI__SYSTEM__FEEDBACK__MODULE.html">Feedback API for Mobile Native</a></li>
+               </ul>
+       </div></div>
+</div>
+
+<div id="container"><div id="contents"><div class="content">
+<h1>Feedback: Playing Sound and Vibrating Patterns</h1>
+
+
+       <p>This tutorial demonstrates how you can feedback for patterns.</p>
+
+
+  <h2>Warm-up</h2>
+    <p>Become familiar with the Feedback API basics by learning about:</p>
+       <ul>
+       <li><a href="#play">Playing Feedback for Specific Pattern</a>
+       <p>Play sound and vibrate for specific pattern.</p></li>
+       <li><a href="#playtype">Playing Feedback for Specific Type and Pattern</a>
+       <p>Play sound and vibrate for specific type and pattern.</p></li>
+       <li><a href="#support">Checking whether Pattern is Supported</a>
+       <p>Retrieve information whether specific pattern is supported.</p></li>
+       </ul>
+
+<h2 id="play" name="play">Playing Feedback for Specific Pattern</h2>
+
+<p>Play sound and vibrate for specific pattern.</p>
+<ol>
+<li><p>To use the functions and data types of the Feedback API (in <a href="../../../../org.tizen.native.mobile.apireference/group__CAPI__SYSTEM__FEEDBACK__MODULE.html">mobile</a> applications), include the <span style="font-family: Courier New,Courier,monospace;">&lt;feedback.h&gt;</span> header file in your application:</p>
+<pre class="prettyprint">
+#include &lt;feedback.h&gt;
+</pre></li>
+<li><p>To play feedback:</p>
+<ul>
+<li>Play feedback pattern with <span style="font-family: Courier New,Courier,monospace;">feedback_play()</span> function.
+<p>The function returns whether playing feedback is success or not.</p>
+<p>It invokes the <span style="font-family: Courier New,Courier,monospace;">sound_play</span> and <span style="font-family: Courier New,Courier,monospace;">vibrator_play</span> internally. It return success when pattern enum is valid.</p>
+<pre class="prettyprint">
+int ret;
+ret = feedback_play(pattern);
+</pre>
+</li>
+
+</ul>
+</li>
+</ol>
+
+<h2 id="playtype" name="playtype">Playing Feedback for Specific Type and Pattern</h2>
+
+<p>Play sound and vibrate for specific type and pattern.</p>
+<ol>
+<li><p>To use the functions and data types of the Feedback API (in <a href="../../../../org.tizen.native.mobile.apireference/group__CAPI__SYSTEM__FEEDBACK__MODULE.html">mobile</a> applications), include the <span style="font-family: Courier New,Courier,monospace;">&lt;feedback.h&gt;</span> header file in your application:</p>
+<pre class="prettyprint">
+#include &lt;feedback.h&gt;
+</pre></li>
+<li><p>To play feedback:</p>
+<ul>
+<li>Play feedback pattern with <span style="font-family: Courier New,Courier,monospace;">feedback_play_type()</span> function.
+
+<p>The function returns whether playing feedback is success or not.</p>
+<p>Internally it invokes the <span style="font-family: Courier New,Courier,monospace;">sound_play</span> or <span style="font-family: Courier New,Courier,monospace;">vibrator_play</span> as feedback type. It return success when pattern enum is valid.</p>
+<pre class="prettyprint">
+static int ret;
+ret = feedback_play(type, pattern);
+</pre>
+</ul>
+</li>
+</ol>
+
+<h2 id="support" name="support">Checking whether Pattern is Supported</h2>
+
+<p>Retrieve information whether specific pattern is supported.</p></li>
+
+<ol>
+<li><p>To use the functions and data types of the Feedback API (in <a href="../../../../org.tizen.native.mobile.apireference/group__CAPI__SYSTEM__FEEDBACK__MODULE.html">mobile</a> applications), include the <span style="font-family: Courier New,Courier,monospace;">&lt;feedback.h&gt;</span> header file in your application:</p>
+<pre class="prettyprint">
+#include &lt;feedback.h&gt;
+</pre></li>
+<li><p>Retrieve support information:</p>
+<ul>
+<li>Retreive information wheter specific pattern is supported for specific feedback type with <span style="font-family: Courier New,Courier,monospace;">feedback_is_supported_pattern()</span> function.
+<p>The function returns whether retreiving feedback information is success or not.</p>
+<p>Internally it invokes the <span style="font-family: Courier New,Courier,monospace;">sound_is_supported</span> or <span style="font-family: Courier New,Courier,monospace;">vibrator_is_supported</span> as feedback type.</p>
+<pre class="prettyprint">
+static int ret;
+bool status;
+ret = feedback_is_supported_pattern(type, pattern, &amp;status);
+</pre>
+
+</li>
+</ul>
+</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>
+