[ACR-80] Documetation updated for active notification.
authorKyuho Jo <kyuho.jo@samsung.com>
Wed, 8 Jul 2015 13:39:16 +0000 (22:39 +0900)
committerKyuho Jo <kyuho.jo@samsung.com>
Wed, 8 Jul 2015 13:40:36 +0000 (22:40 +0900)
Change-Id: I2dcebf273fbe2a62c6451ba468d0986bf9c538d3
Signed-off-by: Kyuho Jo <kyuho.jo@samsung.com>
org.tizen.guides/html/images/active_notification.png [new file with mode: 0644]
org.tizen.guides/html/native/app/notification_n.htm
org.tizen.tutorials/html/native/app_framework/notification_tutorial_n.htm

diff --git a/org.tizen.guides/html/images/active_notification.png b/org.tizen.guides/html/images/active_notification.png
new file mode 100644 (file)
index 0000000..a946460
Binary files /dev/null and b/org.tizen.guides/html/images/active_notification.png differ
index 7dcace0..416a5ec 100644 (file)
-<!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>Notification</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">Content</p>\r
-               <ul class="toc">\r
-                               <li><a href="#type">Notification Types</a></li>\r
-                               <li><a href="#layout">Notification Layouts</a></li>\r
-               </ul>\r
-               <p class="toc-title">Related Info</p>\r
-               <ul class="toc">\r
-                       <li><a href="../../../../org.tizen.tutorials/html/native/app_framework/notification_tutorial_n.htm">Notification Tutorial</a></li>\r
-                       <li><a href="../../../../org.tizen.native.mobile.apireference/group__NOTIFICATION__MODULE.html">Notification API for Mobile Native</a></li>\r
-                       <li><a href="../../../../org.tizen.native.wearable.apireference/group__NOTIFICATION__MODULE.html">Notification API for Wearable Native</a></li>\r
-                       </ul>\r
-       </div></div>\r
-</div>\r
-\r
-<div id="container"><div id="contents"><div class="content">\r
-\r
-<h1>Notification</h1>\r
-  <p>An application can create notifications for the user.</p>\r
-<p>The Tizen Notification API requires the <span style="font-family: Courier New,Courier,monospace">http://tizen.org/privilege/notification</span> privilege.</p>\r
-\r
-<p>To use the notification feature:</p>\r
-<ul><li>To post a simple notification, use the <span style="font-family: Courier New,Courier,monospace">notification_post(</span>) function, which accepts a notification handle as a parameter.\r
-<p>The posted notification has a default notification icon and the application name as the title.</p></li>\r
-<li>To control the detailed behavior of the notification or to show the progress bar in the on-going activity area, use the <span style="font-family: Courier New,Courier,monospace">notification_create()</span> function to get a notification handle and set the details.</li></ul>\r
-\r
-<h2 id="type" name="type">Notification Types</h2>\r
-<p>Tizen provides notifications by using a combination of any of the following notification types:</p>\r
-\r
-<ul><li>Indicator</li> \r
-<li>Quick panel</li>\r
-<li>Sound </li></ul>\r
-\r
-<p>You can specify the message for the indicator or quick panel. The display area for quick panel notifications can be one of the following:</p>\r
-<ul><li>Notification area \r
-<p>The notification area is the reserved space for displaying all notifications, except the on-going notifications.</p></li>\r
-<li>On-going area \r
-<p>The on-going area is the application screen area and is only used to display notifications for the currently running application.</p></li></ul>\r
-\r
-   <p class="figure">Figure: Notification and on-going areas</p> \r
-   <p align="center"><img alt="Notification and on-going areas" src="../../images/notification.png" /></p>\r
-\r
-<h2 id="layout" name="layout">Notification Layouts</h2>\r
-<p>The following notification layouts are provided:</p>\r
-<ul><li><span style="font-family: Courier New,Courier,monospace">NOTIFICATION_LY_NOTI_EVENT_SINGLE</span> \r
-<p>Layout for a single event notification.</p></li>\r
-<li><span style="font-family: Courier New,Courier,monospace">NOTIFICATION_LY_NOTI_EVENT_MULTIPLE</span> \r
-<p>Layout for a multiple event notification.</p></li>\r
-<li><span style="font-family: Courier New,Courier,monospace">NOTIFICATION_LY_NOTI_THUMBNAIL</span> \r
-<p>Layout for a notification displaying images.</p></li>\r
-<li><span style="font-family: Courier New,Courier,monospace">NOTIFICATION_LY_ONGOING_EVENT</span> \r
-<p>Layout for an ongoing notification displaying a text message.</p></li>\r
-<li><span style="font-family: Courier New,Courier,monospace">NOTIFICATION_LY_ONGOING_PROGRESS</span> \r
-<p>Layout for an ongoing notification displaying progress.</p></li></ul>\r
-\r
-   <p class="figure">Figure: Notification layouts</p> \r
-   <p align="center"><img alt="Notification layouts" src="../../images/notification_layout_desc.png" /></p>\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
+<!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>Notification</title> 
+ </head> 
+ <body onload="prettyPrint()" style="overflow: auto;">
+ <div id="toc-navigation">
+       <div id="profile">
+               <p><img alt="Mobile native" src="../../images/mn_icon.png"/> <img alt="Wearable native" src="../../images/wn_icon.png"/></p>
+       </div>
+       
+       <div id="toc_border"><div id="toc">
+
+               <p class="toc-title">Related Info</p>
+               <ul class="toc">
+                       <li><a href="../../../../org.tizen.tutorials/html/native/app_framework/notification_tutorial_n.htm">Notification Tutorial</a></li>
+                       <li><a href="../../../../org.tizen.native.mobile.apireference/group__NOTIFICATION__MODULE.html">Notification API for Mobile Native</a></li>
+                       <li><a href="../../../../org.tizen.native.wearable.apireference/group__NOTIFICATION__MODULE.html">Notification API for Wearable Native</a></li>
+                       </ul>
+       </div></div>
+</div>
+
+<div id="container"><div id="contents"><div class="content">
+
+<h1>Notification</h1>
+  <p>An application can create notifications for the user.</p>
+<p>The Tizen Notification API requires the <span style="font-family: Courier New,Courier,monospace">http://tizen.org/privilege/notification</span> privilege.</p>
+
+<p>To use the notification feature:</p>
+<ul><li>To post a simple notification, use the <span style="font-family: Courier New,Courier,monospace">notification_post(</span>) function, which accepts a notification handle as a parameter.
+<p>The posted notification has a default notification icon and the application name as the title.</p></li>
+<li>To control the detailed behavior of the notification or to show the progress bar in the on-going activity area, use the <span style="font-family: Courier New,Courier,monospace">notification_create()</span> function to get a notification handle and set the details.</li></ul>
+
+<h2 id="type" name="type">Notification Types</h2>
+<p>Tizen provides notifications by using a combination of any of the following notification types:</p>
+
+<ul>
+<li>Quick panel </li>
+<li>Active notification </li>
+<li>Indicator</li> 
+</ul>
+
+<p>You can specify the message for the indicator or quick panel, active notification.</p> 
+<h3 id="quick_panel" name="quick_panel">Notifications on quick panel</h3>
+<p>The display area for quick panel notifications can be one of the following:</p>
+<ul><li>Notification area 
+<p>The notification area is the reserved space for displaying all notifications, except the on-going notifications.</p></li>
+<li>On-going area 
+<p>The on-going area is the application screen area and is only used to display notifications for the currently running application.</p></li></ul>
+
+   <p class="figure">Figure: Notification and on-going areas</p> 
+   <p align="center"><img alt="Notification and on-going areas" src="../../images/notification.png" /></p>
+
+<h3 id="active_notification" name="active_notification">Active Notification</h3>
+<p>Active notification can be used to show a notification on upper side of screen.</p>
+<p>You can add several buttons for getting user interaction.</p>
+
+   <p class="figure">Figure: Active notification</p> 
+   <p align="center"><img alt="Active notification" src="../../images/active_notification.png" /></p>
+
+<h2 id="layout" name="layout">Notification Layouts</h2>
+<p>5 types of layouts are provided. The notifications layout can be one of the following:</p>
+<ul><li>NOTIFICATION_LY_NOTI_EVENT_SINGLE 
+<p>Layout for notification. Used to inform single event.</p></li>
+<li>NOTIFICATION_LY_NOTI_EVENT_MULTIPLE 
+<p>Layout for notification. Used to inform multiple event.</p></li>
+<li>NOTIFICATION_LY_NOTI_THUMBNAIL 
+<p>Layout for notification. Used to display images.</p></li>
+<li>NOTIFICATION_LY_ONGOING_EVENT 
+<p>Layout for ongoing notification. Used to display text message.</p></li>
+<li>NOTIFICATION_LY_ONGOING_PROGRESS 
+<p>Layout for ongoing notification. Used to display progress.</p></li></ul>
+
+   <p class="figure">Figure: Notification layouts</p> 
+   <p align="center"><img alt="Notification layouts" src="../../images/notification_layout_desc.png" /></p>
+
+
+<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>        
\ No newline at end of file
index b1cf813..7db32b4 100644 (file)
@@ -262,6 +262,7 @@ if (ret != NOTIFICATION_ERROR_NONE)
  <li><span style="font-family: Courier New,Courier,monospace">NOTIFICATION_DISPLAY_APP_TICKER</span></li>
  <li><span style="font-family: Courier New,Courier,monospace">NOTIFICATION_DISPLAY_APP_LOCK</span></li>
  <li><span style="font-family: Courier New,Courier,monospace">NOTIFICATION_DISPLAY_APP_INDICATOR</span></li>
+ <li><span style="font-family: Courier New,Courier,monospace">NOTIFICATION_DISPLAY_APP_ACTIVE</span></li>
  <li><span style="font-family: Courier New,Courier,monospace">NOTIFICATION_DISPLAY_APP_ALL</span></li>
 </ul>
 
@@ -336,6 +337,64 @@ if (ret != NOTIFICATION_ERROR_NONE)
 &nbsp;&nbsp;&nbsp;// Error handling
 }</pre>
 
+<h3 id="button" name="button">Adding a button on Active Notification</h3>
+<p>To add a button on Active Notification, use the <span style="font-family: Courier New,Courier,monospace">notification_add_button()</span> function and <span style="font-family: Courier New,Courier,monospace">notification_set_event_handler()</span> function:</p>
+<pre class="prettyprint">notification_add_button(notification_h noti, notification_button_index_e button_index)</pre>
+
+<p>This function takes the following parameters:</p>
+<ul>
+ <li><span style="font-family: Courier New,Courier,monospace">[in] noti</span>: Notification handle.</li>
+ <li><span style="font-family: Courier New,Courier,monospace">[in] button_index</span>: Button index.</li>
+</ul>
+
+<p>The possible values for the <span style="font-family: Courier New,Courier,monospace">button_index</span> parameter are:</p>
+<ul>
+ <li><span style="font-family: Courier New,Courier,monospace">NOTIFICATION_BUTTON_1</span></li>
+ <li><span style="font-family: Courier New,Courier,monospace">NOTIFICATION_BUTTON_2</span></li>
+ <li><span style="font-family: Courier New,Courier,monospace">NOTIFICATION_BUTTON_3</span></li>
+ <li><span style="font-family: Courier New,Courier,monospace">NOTIFICATION_BUTTON_4</span></li>
+ <li><span style="font-family: Courier New,Courier,monospace">NOTIFICATION_BUTTON_5</span></li>
+ <li><span style="font-family: Courier New,Courier,monospace">NOTIFICATION_BUTTON_6</span></li>
+</ul>
+
+<pre class="prettyprint">notification_set_event_handler(notification_h noti, notification_event_type_e event_type, app_control_h event_handler)</pre>
+
+<p>This function takes the following parameters:</p>
+<ul>
+ <li><span style="font-family: Courier New,Courier,monospace">[in] noti</span>: Notification handle.</li>
+ <li><span style="font-family: Courier New,Courier,monospace">[in] button_index</span>: Button index.</li>
+ <li><span style="font-family: Courier New,Courier,monospace">[in] event_handler</span>: app control handle.</li>
+</ul>
+
+<p>The possible values for the <span style="font-family: Courier New,Courier,monospace">event_type</span> parameter are:</p>
+<ul>
+ <li><span style="font-family: Courier New,Courier,monospace">NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1</span></li>
+ <li><span style="font-family: Courier New,Courier,monospace">NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_2</span></li>
+ <li><span style="font-family: Courier New,Courier,monospace">NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_3</span></li>
+ <li><span style="font-family: Courier New,Courier,monospace">NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_4</span></li>
+ <li><span style="font-family: Courier New,Courier,monospace">NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_5</span></li>
+ <li><span style="font-family: Courier New,Courier,monospace">NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_6</span></li>
+</ul>
+
+<pre class="prettyprint">
+
+noti_errnotification_add_button(noti, NOTIFICATION_BUTTON_1);
+if (noti_err != NOTIFICATION_ERROR_NONE) {
+&nbsp;&nbsp;&nbsp;// Error handling
+}
+
+app_control_h app_control = NULL;
+
+app_control_create(&app_control);
+app_control_set_app_id(app_control, "org.tizen.app");
+noti_err  = notification_set_event_handler(noti, NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1, app_control);
+if (noti_err != NOTIFICATION_ERROR_NONE) {
+&nbsp;&nbsp;&nbsp;// Error handling
+}
+
+app_control_destroy(app_control);
+}</pre>
+
  <h2 id="post" name="post">Posting a Notification</h2>
 
 <p>To post a notification to the database, use the <span style="font-family: Courier New,Courier,monospace">notification_post()</span> function:</p>