<p>You can <a href="#progress">create a progress notification</a> that informs the user about the progress of an activity.</p></li>
<li>Managing notifications
<p>You can <a href="#manage">retrieve, update, and remove posted notifications</a>.</p></li>
- <li>Managing Notification templates
- <p>You can <a href="#templates">save templates and create notification</a> based on existing template.</p></li>
+ <li>Managing notification templates
+ <p>You can <a href="#templates">create a template</a> that can be reused in multiple notifications.</p></li>
</ul>
<p>To display a notification, you need to create a <code>Notification</code> object (in <a href="../../../../org.tizen.web.apireference/html/device_api/mobile/tizen/notification.html#Notification">mobile</a> and <a href="../../../../org.tizen.web.apireference/html/device_api/wearable/tizen/notification.html#Notification">wearable</a> applications), or its subtype. </p>
</ol></li>
</ol>
-<h2 id="templates" name="templates">Managing Notification templates</h2>
+<h2 id="templates" name="templates">Managing Notification Templates</h2>
-<p>Learning how to manage notification templates allows you to save a notification as a template and use it later to faster creation of new notifications based on the same pattern:</p>
+<p>Learning how to manage notification templates allows you to create a template from an existing notification, and reuse that template later to quickly create other notifications with the same pattern:</p>
+ <ul>
+ <li>To create a template:
<ol>
- <li><p>To save a template:</p>
- <ol type="a">
- <li>Create a <a href="#create">"SIMPLE"</a> or <a href="#progress">"PROGRESS"</a> notification, which would be used as a template. There is no need to post it.
+ <li>Create a <a href="#create">simple</a> or <a href="#progress">progress</a> notification to be used as a template.
+<p>You do not need to post the notification to save it as a template.</p>
<pre class="prettyprint">
-// assume that myNotification is a valid tizen.StatusNotification object
+/* Assume that myNotification is a valid tizen.StatusNotification object */
var myNotification;
</pre></li>
- <li><p>To save the template, use <code>saveNotificationAsTemplate()</code> method of the <code>NotificationManager</code> interface (in <a href="../../../../org.tizen.web.apireference/html/device_api/mobile/tizen/notification.html#NotificationManager::saveNotificationAsTemplate">mobile</a> and <a href="../../../../org.tizen.web.apireference/html/device_api/wearable/tizen/notification.html#NotificationManager::saveNotificationAsTemplate">wearable</a> applications):</p>
+ <li>Save the template with the <code>saveNotificationAsTemplate()</code> method of the <code>NotificationManager</code> interface (in <a href="../../../../org.tizen.web.apireference/html/device_api/mobile/tizen/notification.html#NotificationManager">mobile</a> and <a href="../../../../org.tizen.web.apireference/html/device_api/wearable/tizen/notification.html#NotificationManager">wearable</a> applications):
<pre class="prettyprint">
try {
var templateName = "importantNoti";
} catch(e) {
console.log("Error " + e.message + " occured");
}
-</pre></li>
- </ol></li>
- <li><p>To use the template for creation of new pre-set notification, use the <code>createNotificationFromTemplate()</code> method of the <code>NotificationManager</code> interface (in <a href="../../../../org.tizen.web.apireference/html/device_api/mobile/tizen/notification.html#NotificationManager::createNotificationFromTemplate">mobile</a> and <a href="../../../../org.tizen.web.apireference/html/device_api/wearable/tizen/notification.html#NotificationManager::createNotificationFromTemplate">wearable</a> applications):</p>
+</pre></li></ol>
+</li>
+<li>To use the template when creating a new notification, use the <code>createNotificationFromTemplate()</code> method of the <code>NotificationManager</code> interface:
<pre class="prettyprint">
try {
var newTemplateNotification = tizen.notification.createNotificationFromTemplate(templateName);
} catch (e) {
console.log("Error " + e.message + " occured");
}
-</pre></li>
- </ol></li>
- </ol>
+</pre></li></ul>
<script type="text/javascript" src="../../scripts/jquery.zclip.min.js"></script>
<script type="text/javascript" src="../../scripts/showhide.js"></script>