[3.0][online-doc][push] coding rule updated (2.4 update)
authorYounho Park <younho.park@samsung.com>
Tue, 17 May 2016 10:00:07 +0000 (19:00 +0900)
committerYounho Park <younho.park@samsung.com>
Tue, 17 May 2016 10:00:07 +0000 (19:00 +0900)
Change-Id: Ib862cf3835b8f79786352f76b0112d71ce8040cc
Signed-off-by: Younho Park <younho.park@samsung.com>
org.tizen.guides/html/native/messaging/push_n.htm
org.tizen.tutorials/html/native/messaging/push_server_tutorial_n.htm
org.tizen.tutorials/html/native/messaging/push_tutorial_n.htm

index 900fee0..22a34b3 100644 (file)
@@ -39,7 +39,7 @@
   <p>Once your application is successfully registered in the push server through the push daemon on the device, your application server can send push messages to the application in that particular device.</p> \r
   <p>When a push message arrives when the application is running, it is automatically delivered to the application. If not, the daemon makes a sound or vibrates and adds a ticker or a badge notification to notify the user. By touching this notification, the user can check the message. The application server may send a message with a <span style="font-family: Courier New,Courier,monospace">LAUNCH</span> option. In this case, the daemon forcibly launches the application and hands over the message to the application as an <a href="../app/appcontrol_n.htm">app control</a>.</p>\r
 \r
-<p>To use the push messaging service, the application needs the permission to access the Tizen push server. Request the permission from the Tizen push service team by <a href="mailto:push.tizen@samsung.com">email</a>, including <a href="../../../../org.tizen.tutorials/html/native/messaging/push_tutorial_n.htm#permission">the following information</a>. When the team approves the request, you receive a push app ID corresponding to your package ID.</p>\r
+<p>To use the push messaging service, the application needs the permission to access the Tizen push server. Request the permission from the Tizen push service team by <a href="mailto:push.tizen@samsung.com">email</a>, including the <a href="../../../../org.tizen.tutorials/html/native/messaging/push_tutorial_n.htm#request_form">necessary information</a>. When the team approves the request, you receive a push app ID corresponding to your package ID.</p>\r
 \r
 <p>Remember to <a href="../../../../org.tizen.tutorials/html/native/messaging/push_tutorial_n.htm#security">take care of security issues</a> when sending notifications with sensitive information.</p>\r
 \r
index d71d135..878b5de 100644 (file)
 
 <p>For example, to show a &quot;Hi&quot; message in the quick panel and increase the badge count by 1 when the notification arrives at the device, the message field of the notification must be the following:</p>
 
-<pre class="prettyprint">&quot;badgeOption=INCREASE&amp;badgeNumber=1&amp;action=ALERT&amp;alertMessage=Hi&quot;</pre>
+<pre class="prettyprint">
+&quot;badgeOption=INCREASE&amp;badgeNumber=1&amp;action=ALERT&amp;alertMessage=Hi&quot;
+</pre>
 
 <p>The message field takes effect only when the application is not running (more precisely, when the application is not connected to the push service). If a notification with the above message field arrives at the device where the application is running, the push service delivers the notification directly to the application. It does not show the &quot;Hi&quot; message in the quick panel or increase the badge count.</p>
 </li>
 <p>If the <span style="font-family: Courier New,Courier,monospace;">regId</span> is base64-encoded, use the <span style="font-family: Courier New,Courier,monospace;">&quot;base64&quot;</span> value for this field. Otherwise, leave this field blank to allow the push server to handle the <span style="font-family: Courier New,Courier,monospace;">regId</span> as a hex string.</p></td>
  <td><ul><li>Optional</li>
  <li>Type: string</li>
- <li>Default: null</li></ul></td>
+ <li>Default: <span style="font-family: Courier New,Courier,monospace;">NULL</span></li></ul></td>
 </tr>
 
 <tr>
  <td>
  <ul><li>Optional</li>
  <li>Type: string</li>
- <li>Default: null</li></ul></td>
+ <li>Default: <span style="font-family: Courier New,Courier,monospace;">NULL</span></li></ul></td>
 </tr>
 <tr>
  <td><span style="font-family: Courier New,Courier,monospace;">message</span></td>
  <p>Maximum message length must be less than 2 kb. Make sure that if there is no message and <span style="font-family: Courier New,Courier,monospace;">appData</span>, the push server rejects the message and returns an error.</p></td>
  <td>
 <ul><li>Conditionally mandatory
-(if <span style="font-family: Courier New,Courier,monospace;">appData</span> is null, this field is required)</li>
+(if <span style="font-family: Courier New,Courier,monospace;">appData</span> is <span style="font-family: Courier New,Courier,monospace;">NULL</span>, this field is required)</li>
  <li>Type: string</li>
- <li>Default: null</li></ul>
+ <li>Default: <span style="font-family: Courier New,Courier,monospace;">NULL</span></li></ul>
 </td>
 </tr>
 <tr>
  <td>Applications can use this field to carry their own data. The handling of this data depends on the type defined with the <span style="font-family: Courier New,Courier,monospace;">type</span> key.
  <p>Make sure that if there is no message and no <span style="font-family: Courier New,Courier,monospace;">appData</span>, the push server rejects the message and returns an error.</p></td>
  <td>
- <ul><li>Conditionally mandatory (if message is null, this field is required)</li>
+ <ul><li>Conditionally mandatory (if message is <span style="font-family: Courier New,Courier,monospace;">NULL</span>, this field is required)</li>
  <li>Type: string</li>
- <li>Default: null</li></ul>
+ <li>Default: <span style="font-family: Courier New,Courier,monospace;">NULL</span></li></ul>
  </td>
 </tr>
 
  <td>
     <ul><li>Optional</li>
  <li>Type: string</li>
- <li>Default: null</li></ul>
+ <li>Default: <span style="font-family: Courier New,Courier,monospace;">NULL</span></li></ul>
  </td>
 </tr>
 <tr>
  <td>
      <ul><li>Optional</li>
  <li>Type: long</li>
- <li>Default: null</li></ul>
+ <li>Default: <span style="font-family: Courier New,Courier,monospace;">NULL</span></li></ul>
  </td>
 </tr>
 </tbody>
@@ -320,15 +322,15 @@ appSecret: dYo/o/m11gmWmjs7+5f+2zLNVOc=
 <li>Example request:
 <pre class="prettyprint">
 {
-&nbsp;&nbsp;&nbsp;&quot;encoding&quot;: &quot;base64&quot; // Optional
-&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab123456&quot;,
-&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000001&quot;,
-&nbsp;&nbsp;&nbsp;&quot;sender&quot;: &quot;oscal&quot;, // Optional
-&nbsp;&nbsp;&nbsp;&quot;type&quot;: 0 //Optional
-&nbsp;&nbsp;&nbsp;&quot;message&quot;: &quot;badgeOption=INCREASE&amp;badgeNumber=1&amp;action=ALERT&amp;alertMessage=Hi&quot;, // Optional
-&nbsp;&nbsp;&nbsp;&quot;appData&quot;: &quot;{id:asdf&amp;passwd:1234}&quot;, // Optional, (Opaque)
-&nbsp;&nbsp;&nbsp;&quot;sessionInfo&quot;: &quot;002002&quot;, // Optional
-&nbsp;&nbsp;&nbsp;&quot;timeStamp&quot;: 1234567890, // Optional
+&nbsp;&nbsp;&nbsp;&nbsp;&quot;encoding&quot;: &quot;base64&quot; /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab123456&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000001&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&quot;sender&quot;: &quot;oscal&quot;, /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;&quot;type&quot;: 0 /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;&quot;message&quot;: &quot;badgeOption=INCREASE&amp;badgeNumber=1&amp;action=ALERT&amp;alertMessage=Hi&quot;, /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;&quot;appData&quot;: &quot;{id:asdf&amp;passwd:1234}&quot;, /* Optional, (Opaque) */
+&nbsp;&nbsp;&nbsp;&nbsp;&quot;sessionInfo&quot;: &quot;002002&quot;, /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;&quot;timeStamp&quot;: 1234567890, /* Optional */
 }
 </pre>
 </li>
@@ -341,13 +343,13 @@ appSecret: dYo/o/m11gmWmjs7+5f+2zLNVOc=
 <p>The following example shows a response message when the request is successful:</p>
 <pre class="prettyprint">
 {
-&nbsp;&nbsp;&nbsp;&quot;results&quot;:
-&nbsp;&nbsp;&nbsp;[{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab123456&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000001&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 1000,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;Success&quot;
-&nbsp;&nbsp;&nbsp;}]
+&nbsp;&nbsp;&nbsp;&nbsp;&quot;results&quot;:
+&nbsp;&nbsp;&nbsp;&nbsp;[{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab123456&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000001&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 1000,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;Success&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;}]
 }
 </pre>
 </li>
@@ -355,13 +357,13 @@ appSecret: dYo/o/m11gmWmjs7+5f+2zLNVOc=
 <p>The following example shows a response message when the request fails due to malformation:</p>
 <pre class="prettyprint">
 {
-&nbsp;&nbsp;&nbsp;&quot;results&quot;:
-&nbsp;&nbsp;&nbsp;[{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 3023,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;error of json mapping exception&quot;
-&nbsp;&nbsp;&nbsp;}]
+&nbsp;&nbsp;&nbsp;&nbsp;&quot;results&quot;:
+&nbsp;&nbsp;&nbsp;&nbsp;[{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 3023,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;error of json mapping exception&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;}]
 }
 </pre>
 </li>
@@ -369,13 +371,13 @@ appSecret: dYo/o/m11gmWmjs7+5f+2zLNVOc=
 <p>The following example shows a response message when the request fails due to abnormal data:</p>
 <pre class="prettyprint">
 {
-&nbsp;&nbsp;&nbsp;&quot;results&quot;:
-&nbsp;&nbsp;&nbsp;[{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab123456&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000001&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 3008,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;error of not registered regID&quot;
-&nbsp;&nbsp;&nbsp;}]
+&nbsp;&nbsp;&nbsp;&nbsp;&quot;results&quot;:
+&nbsp;&nbsp;&nbsp;&nbsp;[{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab123456&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000001&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 3008,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;error of not registered regID&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;}]
 }
 </pre>
 <table class="note">
@@ -412,31 +414,31 @@ appSecret: dYo/o/m11gmWmjs7+5f+2zLNVOc=
 <li>Example request:
 <pre class="prettyprint">
 {
-&nbsp;&nbsp;&nbsp;&quot;messages&quot;:
-&nbsp;&nbsp;&nbsp;[{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;encoding&quot;: &quot;base64&quot; // Optional
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab123456&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000001&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;sender&quot;: &quot;oscal&quot;, // Optional
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;type&quot;: 0 // Optional
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;message&quot;: &quot;example&quot;, // Optional
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;appData&quot;: &quot;{id:asdf&amp;passwd:1234}&quot;, // Optional, (Opaque)
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;reliableOption&quot;: &quot;Transport&quot;, // Optional
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;sessionInfo&quot;: &quot;192.168.0.1-8080-12345567&quot;, // Optional
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;timeStamp&quot;: 1234567890, // Optional
-&nbsp;&nbsp;&nbsp;}
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;encoding&quot;: &quot;base64&quot; // Optional
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab234567&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000002&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;sender&quot;: &quot;oscal&quot;, // Optional
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;type&quot;: 0 // Optional
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;message&quot;: &quot;example&quot;, // Optional
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;appData&quot;: &quot;{id:asdf&amp;passwd:1234}&quot;, // Optional, (Opaque)
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;reliableOption&quot;: &quot;Transport&quot;, // Optional
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;sessionInfo&quot;: &quot;192.168.0.1-8080-12345567&quot;, // Optional
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;timeStamp&quot;: 1234567890, // Optional
-&nbsp;&nbsp;&nbsp;]}
+&nbsp;&nbsp;&nbsp;&nbsp;&quot;messages&quot;:
+&nbsp;&nbsp;&nbsp;&nbsp;[{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;encoding&quot;: &quot;base64&quot; /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab123456&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000001&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;sender&quot;: &quot;oscal&quot;, /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;type&quot;: 0 /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;message&quot;: &quot;example&quot;, /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;appData&quot;: &quot;{id:asdf&amp;passwd:1234}&quot;, /* Optional, (Opaque) */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;reliableOption&quot;: &quot;Transport&quot;, /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;sessionInfo&quot;: &quot;192.168.0.1-8080-12345567&quot;, /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;timeStamp&quot;: 1234567890, /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;encoding&quot;: &quot;base64&quot; /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab234567&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000002&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;sender&quot;: &quot;oscal&quot;, /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;type&quot;: 0 /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;message&quot;: &quot;example&quot;, /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;appData&quot;: &quot;{id:asdf&amp;passwd:1234}&quot;, /* Optional, (Opaque) */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;reliableOption&quot;: &quot;Transport&quot;, /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;sessionInfo&quot;: &quot;192.168.0.1-8080-12345567&quot;, /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;timeStamp&quot;: 1234567890, /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;]}
 }
 </pre>
 </li>
@@ -447,19 +449,19 @@ appSecret: dYo/o/m11gmWmjs7+5f+2zLNVOc=
 <p>The following example shows a response message when the request is successful:</p>
 <pre class="prettyprint">
 {
-&nbsp;&nbsp;&nbsp;&quot;results&quot;:
-&nbsp;&nbsp;&nbsp;[{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab123456&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000001&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 1000,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;Success&quot;
-&nbsp;&nbsp;&nbsp;}
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab234567&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000002&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 1000,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;Success&quot;
-&nbsp;&nbsp;&nbsp;}]
+&nbsp;&nbsp;&nbsp;&nbsp;&quot;results&quot;:
+&nbsp;&nbsp;&nbsp;&nbsp;[{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab123456&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000001&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 1000,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;Success&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab234567&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000002&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 1000,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;Success&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;}]
 }
 </pre>
 </li>
@@ -467,13 +469,13 @@ appSecret: dYo/o/m11gmWmjs7+5f+2zLNVOc=
 <p>The following example shows a response message when the request fails due to malformation:</p>
 <pre class="prettyprint">
 {
-&nbsp;&nbsp;&nbsp;&quot;results&quot;:
-&nbsp;&nbsp;&nbsp;[{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 3023,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;error of json mapping exception&quot;
-&nbsp;&nbsp;&nbsp;}]
+&nbsp;&nbsp;&nbsp;&nbsp;&quot;results&quot;:
+&nbsp;&nbsp;&nbsp;&nbsp;[{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 3023,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;error of json mapping exception&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;}]
 }
 </pre>
 </li>
@@ -481,18 +483,18 @@ appSecret: dYo/o/m11gmWmjs7+5f+2zLNVOc=
 <p>The following example shows a response message when some parts of the multiple request have failed and the others have not:</p>
 <pre class="prettyprint">
 {
-&nbsp;&nbsp;&nbsp;&quot;results&quot;:
-&nbsp;&nbsp;&nbsp;[{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab123456&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000001&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 1000,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;Success&quot;
-&nbsp;&nbsp;&nbsp;}
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab234567&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000002&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 3008,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;error of not registered regID&quot;+&nbsp;&nbsp;&nbsp;}]
+&nbsp;&nbsp;&nbsp;&nbsp;&quot;results&quot;:
+&nbsp;&nbsp;&nbsp;&nbsp;[{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab123456&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000001&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 1000,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;Success&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab234567&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000002&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 3008,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;error of not registered regID&quot;+&nbsp;&nbsp;&nbsp;}]
 }
 </pre>
 </li>
@@ -520,18 +522,18 @@ appSecret: dYo/o/m11gmWmjs7+5f+2zLNVOc=
 <li>Example request:
 <pre class="prettyprint">
 {
-&nbsp;&nbsp;&nbsp;&quot;messages&quot;:
-&nbsp;&nbsp;&nbsp;[{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;encoding&quot;: &quot;base64&quot; // Optional
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: [&quot;ab123456&quot;, &quot;ab234567&quot;, &quot;ab345678&quot;]
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000001&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;sender&quot;: &quot;oscal&quot;, // Optional
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;type&quot;: 0 // Optional
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;message&quot;: &quot;example&quot;, // Optional
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;appData&quot;: &quot;{id:asdf&amp;passwd:1234}&quot;, // Optional
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;sessionInfo&quot;: &quot;192.168.0.1-8080-12345567&quot;, // Optional
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;timeStamp&quot;: 1234567890, // Optional
-&nbsp;&nbsp;&nbsp;]}
+&nbsp;&nbsp;&nbsp;&nbsp;&quot;messages&quot;:
+&nbsp;&nbsp;&nbsp;&nbsp;[{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;encoding&quot;: &quot;base64&quot; /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: [&quot;ab123456&quot;, &quot;ab234567&quot;, &quot;ab345678&quot;]
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000001&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;sender&quot;: &quot;oscal&quot;, /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;type&quot;: 0 /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;message&quot;: &quot;example&quot;, /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;appData&quot;: &quot;{id:asdf&amp;passwd:1234}&quot;, /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;sessionInfo&quot;: &quot;192.168.0.1-8080-12345567&quot;, /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;timeStamp&quot;: 1234567890, /* Optional */
+&nbsp;&nbsp;&nbsp;&nbsp;]}
 }
 </pre>
 </li>
@@ -542,25 +544,25 @@ appSecret: dYo/o/m11gmWmjs7+5f+2zLNVOc=
 <p>The following example shows a response message when the request is successful:</p>
 <pre class="prettyprint">
 {
-&nbsp;&nbsp;&nbsp;&quot;results&quot;:
-&nbsp;&nbsp;&nbsp;[{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab123456&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000001&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 1000,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;Success&quot;
-&nbsp;&nbsp;&nbsp;}
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab234567&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000002&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 1000,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;Success&quot;
-&nbsp;&nbsp;&nbsp;}
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab345678&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000002&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 1000,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;Success&quot;
-&nbsp;&nbsp;&nbsp;}]
+&nbsp;&nbsp;&nbsp;&nbsp;&quot;results&quot;:
+&nbsp;&nbsp;&nbsp;&nbsp;[{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab123456&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000001&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 1000,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;Success&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab234567&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000002&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 1000,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;Success&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab345678&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000002&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 1000,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;Success&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;}]
 }
 </pre>
 </li>
@@ -568,13 +570,13 @@ appSecret: dYo/o/m11gmWmjs7+5f+2zLNVOc=
 <p>The following example shows a response message when the request fails due to malformation:</p>
 <pre class="prettyprint">
 {
-&nbsp;&nbsp;&nbsp;&quot;results&quot;:
-&nbsp;&nbsp;&nbsp;[{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 3023,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;error of json mapping exception&quot;
-&nbsp;&nbsp;&nbsp;}]
+&nbsp;&nbsp;&nbsp;&nbsp;&quot;results&quot;:
+&nbsp;&nbsp;&nbsp;&nbsp;[{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 3023,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;error of json mapping exception&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;}]
 }
 </pre>
 </li>
@@ -582,25 +584,25 @@ appSecret: dYo/o/m11gmWmjs7+5f+2zLNVOc=
 <p>The following example shows a response message when some parts of the multicast request have failed and the others have not:</p>
 <pre class="prettyprint">
 {
-&nbsp;&nbsp;&nbsp;&quot;results&quot;:
-&nbsp;&nbsp;&nbsp;[{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab123456&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000001&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 1000,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;Success&quot;
-&nbsp;&nbsp;&nbsp;}
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab234567&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000001&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 3008,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;error of not registered regID&quot;
-&nbsp;&nbsp;&nbsp;}
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab345678&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000001&quot;,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 3013,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;error of impossible to enqueue&quot;
-&nbsp;&nbsp;&nbsp;}]
+&nbsp;&nbsp;&nbsp;&nbsp;&quot;results&quot;:
+&nbsp;&nbsp;&nbsp;&nbsp;[{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab123456&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000001&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 1000,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;Success&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab234567&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000001&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 3008,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;error of not registered regID&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;ab345678&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;0000001&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusCode&quot;: 3013,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;statusMsg&quot;: &quot;error of impossible to enqueue&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;}]
 }
 </pre>
 </li>
@@ -705,7 +707,7 @@ appSecret: dYo/o/m11gmWmjs7+5f+2zLNVOc=
 </tr>
 <tr>
  <td>3018</td>
- <td>Error of notification data contains unreadable data or null</td>
+ <td>Error of notification data contains unreadable data or <span style="font-family: Courier New,Courier,monospace;">NULL</span></td>
 </tr>
 <tr>
  <td>3019</td>
index 181e1d3..0c44479 100644 (file)
@@ -23,6 +23,7 @@
     <div id="toc_border"><div id="toc">
                <p class="toc-title">Content</p>
                <ul class="toc">
+                               <li><a href="#prerequisites">Prerequisites</a></li>
                                <li><a href="#start">Initializing the Push Service</a></li>
                                <li><a href="#connect">Connecting to the Push Service</a></li>
                                <li><a href="#registration">Registering with the Push Server</a></li>
                <li><a href="#security">Managing Security</a>
                <p>Ensure the security of notifications containing sensitive information.</p></li>
        </ul>
-          
+
+<h2 id="prerequisites">Prerequisites</h2>
+
+<p>To use the Push API, the application has to request permission by adding the following privilege to the <span style="font-family: Courier New,Courier,monospace;">tizen-manifest.xml</span> file:</p>
+<pre class="prettyprint">
+&lt;privileges&gt;
+&nbsp;&nbsp;&nbsp;&lt;privilege&gt;http://tizen.org/privilege/push&lt;/privilege&gt;
+&lt;/privileges&gt;
+</pre>
 
  <h2 id="start" name="start">Initializing the Push Service</h2>
 
 <p>To use the push messaging service, the application needs the permission to access the Tizen push server. Request the permission from the Tizen push service team by <a href="mailto:push.tizen@samsung.com">email</a>, including the following information. When the team approves the request, you receive a push app ID corresponding to your package ID.</p></li>
 </ol>
 
-<table>
+<table id="request_form">
 <caption>Table: Request form details</caption>
 <tbody>
     <tr> 
 </table>
 
 
-<p>To set up the required library and privilege for the application:</p>
+<p>To define the required library and application set-up:</p>
 <ol>
 <li><p>To use the functions and data types of the Push API (in <a href="../../../../org.tizen.native.mobile.apireference/group__CAPI__MESSAGING__PUSH__PUBLIC__MODULE.html">mobile</a> and <a href="../../../../org.tizen.native.wearable.apireference/group__CAPI__MESSAGING__PUSH__PUBLIC__MODULE.html">wearable</a> applications), include the <span style="font-family: Courier New,Courier,monospace;">&lt;push-service.h&gt;</span> header file to your application:</p>
 
 </pre>
 </li>
 
-<li id="privilege" name="privilege"><p>To access the Tizen push service on the device, add the following privilege to the manifest file:
-</p>
-
-<pre class="prettyprint">
-http://tizen.org/privilege/push
-</pre>
-</li>
 <li><p>To ensure that push notifications are handled fluently, make both a service and UI application. The service application receives push notifications in the background, while the UI application shows the notifications or events triggered by notifications to the users. An example implementation is available in the push sample package in the Tizen SDK.</p>
 </li>
 </ol>
@@ -196,21 +198,20 @@ push_service_connection_h push_conn;
 <pre class="prettyprint">
 #define PUSH_APP_ID &quot;YOUR_PUSH_ID_HERE&quot;
 
-static bool 
+static bool
 app_create(void *data)
 {
-&nbsp;&nbsp;&nbsp;int ret;
+&nbsp;&nbsp;&nbsp;&nbsp;int ret;
 
-&nbsp;&nbsp;&nbsp;// Connect to the push service when the application is launched
-&nbsp;&nbsp;&nbsp;ret = push_service_connect(PUSH_APP_ID, _state_cb, _noti_cb, NULL, &amp;push_conn);
+&nbsp;&nbsp;&nbsp;&nbsp;/* Connect to the push service when the application is launched */
+&nbsp;&nbsp;&nbsp;&nbsp;ret = push_service_connect(PUSH_APP_ID, _state_cb, _noti_cb, NULL, &amp;push_conn);
 
-&nbsp;&nbsp;&nbsp;if (ret != PUSH_SERVICE_ERROR_NONE) 
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Implementation here
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;push_service_connect() Failed&quot;);
-&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;if (ret != PUSH_SERVICE_ERROR_NONE) {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Implementation here */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;push_service_connect() Failed&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;}
 
-&nbsp;&nbsp;&nbsp;return true;
+&nbsp;&nbsp;&nbsp;&nbsp;return true;
 }
 </pre>
 
@@ -218,7 +219,7 @@ app_create(void *data)
 <ul>
 <li>The <span style="font-family: Courier New,Courier,monospace;">YOUR_PUSH_ID_HERE</span> parameter is the push app ID received from the Tizen push server team when the access to the server was requested. Keep this push app ID confidential, otherwise your push notifications can be hijacked by malicious applications.</li>
 <li>The <span style="font-family: Courier New,Courier,monospace;">_state_cb()</span> and <span style="font-family: Courier New,Courier,monospace;">_noti_cb()</span> parameters are callback functions called when the <a href="#state">state changes</a> or <a href="#receive_push">a notification arrives from the server</a> through the push service.</li>
-<li>The <span style="font-family: Courier New,Courier,monospace;">push_conn</span> parameter is the output of the <span style="font-family: Courier New,Courier,monospace;">push_service_connect()</span> function. If the connection between the application and the service is successful, the <span style="font-family: Courier New,Courier,monospace;">push_service_connect()</span> function returns <span style="font-family: Courier New,Courier,monospace;">PUSH_SERVICE_ERROR_NONE</span> and the <span style="font-family: Courier New,Courier,monospace;">push_conn</span> connection handle is returned through the last parameter. If the <span style="font-family: Courier New,Courier,monospace;">push_service_connect()</span> function returns other values, the connection to the service failed. This happens most likely when the <a href="#privilege">push privilege</a> is not added in the SDK.</li>
+<li>The <span style="font-family: Courier New,Courier,monospace;">push_conn</span> parameter is the output of the <span style="font-family: Courier New,Courier,monospace;">push_service_connect()</span> function. If the connection between the application and the service is successful, the <span style="font-family: Courier New,Courier,monospace;">push_service_connect()</span> function returns <span style="font-family: Courier New,Courier,monospace;">PUSH_SERVICE_ERROR_NONE</span> and the <span style="font-family: Courier New,Courier,monospace;">push_conn</span> connection handle is returned through the last parameter. If the <span style="font-family: Courier New,Courier,monospace;">push_service_connect()</span> function returns other values, the connection to the service failed. This happens most likely when the <a href="#prerequisites">push privilege</a> is not added in the SDK.</li>
 </ul>
 
 <p>This sample application establishes a connection to the service when it is launched and disconnects from the service when it terminates. Due to this, the <span style="font-family: Courier New,Courier,monospace;">push_service_connect()</span> function is located in the <span style="font-family: Courier New,Courier,monospace;">app_create()</span> function, which is called when the application is launched.
@@ -253,30 +254,26 @@ push_conn = NULL;
 <p>When the current state transits, the <span style="font-family: Courier New,Courier,monospace;">_state_cb()</span> function is called and the new state is obtained from the first parameter. Determine the application actions based on the new state:</p>
 
 <pre class="prettyprint">
-static void 
-_state_cb(push_service_state_e state, const char *err, void *user_data)        
+static void
+_state_cb(push_service_state_e state, const char *err, void *user_data)
 {
-&nbsp;&nbsp;&nbsp;switch (state)       
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case PUSH_SERVICE_STATE_UNREGISTERED:
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;Arrived at STATE_UNREGISTERED&quot;);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_on_state_unregistered(user_data);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case PUSH_SERVICE_STATE_REGISTERED:
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;Arrived at STATE_REGISTERED&quot;);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_on_state_registered(user_data);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case PUSH_SERVICE_STATE_ERROR:
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;Arrived at STATE_ERROR&quot;);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_on_state_error(err, user_data);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;default:
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;Unknown State&quot;);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
-&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;switch (state) {
+&nbsp;&nbsp;&nbsp;&nbsp;case PUSH_SERVICE_STATE_UNREGISTERED:
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;Arrived at STATE_UNREGISTERED&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_on_state_unregistered(user_data);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
+&nbsp;&nbsp;&nbsp;&nbsp;case PUSH_SERVICE_STATE_REGISTERED:
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;Arrived at STATE_REGISTERED&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_on_state_registered(user_data);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
+&nbsp;&nbsp;&nbsp;&nbsp;case PUSH_SERVICE_STATE_ERROR:
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;Arrived at STATE_ERROR&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_on_state_error(err, user_data);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
+&nbsp;&nbsp;&nbsp;&nbsp;default:
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;Unknown State&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
+&nbsp;&nbsp;&nbsp;&nbsp;}
 }
 </pre>
 
@@ -297,16 +294,16 @@ _state_cb(push_service_state_e state, const char *err, void *user_data)
 <pre class="prettyprint">
 #define PUSH_HASH_KEY &quot;existing_push_reg_id&quot;
 
-static void 
-_on_state_unregistered(void *user_data) 
+static void
+_on_state_unregistered(void *user_data)
 {
-&nbsp;&nbsp;&nbsp;int ret;
+&nbsp;&nbsp;&nbsp;&nbsp;int ret;
 
-&nbsp;&nbsp;&nbsp;// Reset the previously-stored registration ID
-&nbsp;&nbsp;&nbsp;ret = preference_set_string(PUSH_HASH_KEY, &quot;&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;/* Reset the previously-stored registration ID */
+&nbsp;&nbsp;&nbsp;&nbsp;ret = preference_set_string(PUSH_HASH_KEY, &quot;&quot;);
 
-&nbsp;&nbsp;&nbsp;// Send a registration request to the push service
-&nbsp;&nbsp;&nbsp;ret = push_service_register(push_conn, _result_cb, NULL);
+&nbsp;&nbsp;&nbsp;&nbsp;/* Send a registration request to the push service */
+&nbsp;&nbsp;&nbsp;&nbsp;ret = push_service_register(push_conn, _result_cb, NULL);
 }
 </pre>
 
@@ -315,15 +312,15 @@ _on_state_unregistered(void *user_data)
 <p>The registration request is non-blocking. If the <span style="font-family: Courier New,Courier,monospace;">push_service_register()</span> function returns <span style="font-family: Courier New,Courier,monospace;">PUSH_SERVICE_ERROR_NONE</span>, the request is successfully delivered to the push service. However, it does not necessarily mean that the request is approved by the server. If the push service successfully sends the request to the server and receives an approval, the <span style="font-family: Courier New,Courier,monospace;">_result_cb()</span> callback is called with <span style="font-family: Courier New,Courier,monospace;">PUSH_SERVICE_RESULT_SUCCESS</span> as the first parameter:</p>
 
 <pre class="prettyprint">
-static void 
-_result_cb(push_service_result_e result, const char *msg, void *user_data) 
+static void
+_result_cb(push_service_result_e result, const char *msg, void *user_data)
 {
-&nbsp;&nbsp;&nbsp;if (result == PUSH_SERVICE_RESULT_SUCCESS)
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;Registration request is approved.&quot;);
-&nbsp;&nbsp;&nbsp;else
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_ERROR, LOG_TAG, &quot;Registration ERROR [%s]&quot;, msg);
+&nbsp;&nbsp;&nbsp;&nbsp;if (result == PUSH_SERVICE_RESULT_SUCCESS)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;Registration request is approved.&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_ERROR, LOG_TAG, &quot;Registration ERROR [%s]&quot;, msg);
 
-&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;&nbsp;return;
 }
 </pre>
 
@@ -346,31 +343,30 @@ _result_cb(push_service_result_e result, const char *msg, void *user_data)
 </ul>
 
 <pre class="prettyprint">
-static void 
-_on_state_registered(void *user_data) 
+static void
+_on_state_registered(void *user_data)
 {
-&nbsp;&nbsp;&nbsp;int ret;
-&nbsp;&nbsp;&nbsp;char *reg_id = NULL;
-&nbsp;&nbsp;&nbsp;char *app_id = NULL;
+&nbsp;&nbsp;&nbsp;&nbsp;int ret;
+&nbsp;&nbsp;&nbsp;&nbsp;char *reg_id = NULL;
+&nbsp;&nbsp;&nbsp;&nbsp;char *app_id = NULL;
 
-&nbsp;&nbsp;&nbsp;// Request unread notifications to the push service 
-&nbsp;&nbsp;&nbsp;// _noti_cb() is called if there are unread notifications
-&nbsp;&nbsp;&nbsp;ret = push_service_request_unread_notification(push_conn);
+&nbsp;&nbsp;&nbsp;&nbsp;/* Request unread notifications to the push service */
+&nbsp;&nbsp;&nbsp;&nbsp;/* _noti_cb() is called if there are unread notifications */
+&nbsp;&nbsp;&nbsp;&nbsp;ret = push_service_request_unread_notification(push_conn);
 
-&nbsp;&nbsp;&nbsp;// Get the registration ID
-&nbsp;&nbsp;&nbsp;ret = push_service_get_registration_id(push_conn, &amp;reg_id);
-&nbsp;&nbsp;&nbsp;if (ret != PUSH_SERVICE_ERROR_NONE)  
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_ERROR, LOG_TAG, &quot;ERROR [%d]: push_service_get_registration_id()&quot;, ret);
+&nbsp;&nbsp;&nbsp;&nbsp;/* Get the registration ID */
+&nbsp;&nbsp;&nbsp;&nbsp;ret = push_service_get_registration_id(push_conn, &amp;reg_id);
+&nbsp;&nbsp;&nbsp;&nbsp;if (ret != PUSH_SERVICE_ERROR_NONE) {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_ERROR, LOG_TAG, &quot;ERROR [%d]: push_service_get_registration_id()&quot;, ret);
 
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
-&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;&nbsp;}
 
-&nbsp;&nbsp;&nbsp;// Send reg_id to your application server if necessary
-&nbsp;&nbsp;&nbsp;_send_reg_id_if_necessary(reg_id);
+&nbsp;&nbsp;&nbsp;&nbsp;/* Send reg_id to your application server if necessary */
+&nbsp;&nbsp;&nbsp;&nbsp;_send_reg_id_if_necessary(reg_id);
 
-&nbsp;&nbsp;&nbsp;if (reg_id)
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(reg_id);
+&nbsp;&nbsp;&nbsp;&nbsp;if (reg_id)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(reg_id);
 }
 </pre>
 
@@ -382,46 +378,44 @@ _on_state_registered(void *user_data)
 #include &lt;openssl/sha.h&gt;
 #define PUSH_HASH_KEY &quot;existing_push_reg_id&quot;
 
-static void 
+static void
 _send_reg_id_if_necessary(const char *reg_id)
 {
-&nbsp;&nbsp;&nbsp;unsigned char md[SHA_DIGEST_LENGTH];
-&nbsp;&nbsp;&nbsp;char hash_string[2*SHA_DIGEST_LENGTH+1];
-&nbsp;&nbsp;&nbsp;char *buf_ptr = hash_string;
-&nbsp;&nbsp;&nbsp;char *stored_hash_value = NULL;
-&nbsp;&nbsp;&nbsp;int ret, i;
-
-&nbsp;&nbsp;&nbsp;// Generate a hash string from reg_id
-&nbsp;&nbsp;&nbsp;SHA1((unsigned char *)reg_id, sizeof(reg_id), md);
-
-&nbsp;&nbsp;&nbsp;// Convert byte array to hex string
-&nbsp;&nbsp;&nbsp;for (i = 0; i &lt; SHA_DIGEST_LENGTH; i++)
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;buf_ptr += sprintf(buf_ptr, &quot;%02X&quot;, md[i]);
-&nbsp;&nbsp;&nbsp;}
-&nbsp;&nbsp;&nbsp;hash_string[2*SHA_DIGEST_LENGTH] = &#39;\0&#39;;
-
-&nbsp;&nbsp;&nbsp;// Get the saved hash string
-&nbsp;&nbsp;&nbsp;ret = preference_get_string(PUSH_HASH_KEY, &amp;stored_hash_value);
-
-&nbsp;&nbsp;&nbsp;// If there is no hash string stored before or
-&nbsp;&nbsp;&nbsp;// if the stored hash string is different from the new one,
-&nbsp;&nbsp;&nbsp;// send reg_id to the server
-&nbsp;&nbsp;&nbsp;if (ret != PREFERENCE_ERROR_NONE || strncmp(stored_hash_value, hash_string, 2*SHA_DIGEST_LENGTH) !=0) 
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Send the reg_id to your application server
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret = _send_reg_id(reg_id);
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// If reg_id is successfully sent, store the new hash value.
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!ret) 
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret = preference_set_string(PUSH_HASH_KEY, hash_string);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
-&nbsp;&nbsp;&nbsp;}
-&nbsp;&nbsp;&nbsp;if (stored_hash_value) 
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(stored_hash_value);
-
-&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;&nbsp;unsigned char md[SHA_DIGEST_LENGTH];
+&nbsp;&nbsp;&nbsp;&nbsp;char hash_string[2*SHA_DIGEST_LENGTH+1];
+&nbsp;&nbsp;&nbsp;&nbsp;char *buf_ptr = hash_string;
+&nbsp;&nbsp;&nbsp;&nbsp;char *stored_hash_value = NULL;
+&nbsp;&nbsp;&nbsp;&nbsp;int ret;
+&nbsp;&nbsp;&nbsp;&nbsp;int i;
+
+&nbsp;&nbsp;&nbsp;&nbsp;/* Generate a hash string from reg_id */
+&nbsp;&nbsp;&nbsp;&nbsp;SHA1((unsigned char *)reg_id, sizeof(reg_id), md);
+
+&nbsp;&nbsp;&nbsp;&nbsp;/* Convert byte array to hex string */
+&nbsp;&nbsp;&nbsp;&nbsp;for (i = 0; i &lt; SHA_DIGEST_LENGTH; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;buf_ptr += sprintf(buf_ptr, &quot;%02X&quot;, md[i]);
+&nbsp;&nbsp;&nbsp;&nbsp;hash_string[2*SHA_DIGEST_LENGTH] = &#39;\0&#39;;
+
+&nbsp;&nbsp;&nbsp;&nbsp;/* Get the saved hash string */
+&nbsp;&nbsp;&nbsp;&nbsp;ret = preference_get_string(PUSH_HASH_KEY, &amp;stored_hash_value);
+
+&nbsp;&nbsp;&nbsp;&nbsp;/*
+&nbsp;&nbsp;&nbsp;&nbsp;   If there is no hash string stored before or
+&nbsp;&nbsp;&nbsp;&nbsp;   if the stored hash string is different from the new one,
+&nbsp;&nbsp;&nbsp;&nbsp;   send reg_id to the server
+&nbsp;&nbsp;&nbsp;&nbsp;*/
+&nbsp;&nbsp;&nbsp;&nbsp;if (ret != PREFERENCE_ERROR_NONE || strncmp(stored_hash_value, hash_string, 2*SHA_DIGEST_LENGTH) !=0) {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Send the reg_id to your application server */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret = _send_reg_id(reg_id);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* If reg_id is successfully sent, store the new hash value */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!ret)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret = preference_set_string(PUSH_HASH_KEY, hash_string);
+&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;if (stored_hash_value)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(stored_hash_value);
+
+&nbsp;&nbsp;&nbsp;&nbsp;return;
 }
 </pre>
 </li>
@@ -466,10 +460,10 @@ appSecret: dYo/o/m11gmWmjs7+5f+2zLNVOc=
 <li>Body:
 <pre class="prettyprint">
 {
-&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;0501a53f4affdcbb98197f188345ff30c04b&quot;,
-&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;01231-22EAX-223442&quot;,
-&nbsp;&nbsp;&nbsp;&quot;message&quot;: &quot;badgeOption=INCREASE&amp;badgeNumber=1&amp;action=ALERT&amp;alertMessage=Hi&quot;,
-&nbsp;&nbsp;&nbsp;&quot;appData&quot;: &quot;{id:asdf&amp;passwd:1234}&quot;, // Optional, if the message field is not empty
+&nbsp;&nbsp;&nbsp;&nbsp;&quot;regID&quot;: &quot;0501a53f4affdcbb98197f188345ff30c04b&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&quot;requestID&quot;: &quot;01231-22EAX-223442&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&quot;message&quot;: &quot;badgeOption=INCREASE&amp;badgeNumber=1&amp;action=ALERT&amp;alertMessage=Hi&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&quot;appData&quot;: &quot;{id:asdf&amp;passwd:1234}&quot;, /* Optional, if the message field is not empty */
 }
 </pre></li>
 </ul>
@@ -555,50 +549,52 @@ appSecret: dYo/o/m11gmWmjs7+5f+2zLNVOc=
 <p>The following example shows how the application can retrieve the app data (payload), message, and timestamp from the received notification. When the <span style="font-family: Courier New,Courier,monospace;">_noti_cb()</span> callback is called, obtain the notification through the first parameter. You can retrieve the app data, message, and time stamp from the handle using the <span style="font-family: Courier New,Courier,monospace;">push_service_get_notification_data()</span>, <span style="font-family: Courier New,Courier,monospace;">push_service_get_notification_message()</span>, and <span style="font-family: Courier New,Courier,monospace;">push_service_get_notification_time()</span> functions respectively. Before exiting the function, free the data, except for the notification itself. The notification is freed automatically right after the callback.</p>
 
 <pre class="prettyprint">
-static void 
+static void
 _noti_cb(push_service_notification_h noti, void *user_data)
 {
-&nbsp;&nbsp;&nbsp;int ret;
-
-&nbsp;&nbsp;&nbsp;char *data=NULL; // App data loaded on the notification
-&nbsp;&nbsp;&nbsp;char *msg=NULL; // Noti message
-&nbsp;&nbsp;&nbsp;long long int time_stamp; // Time when the noti is generated
-&nbsp;&nbsp;&nbsp;char *sender=NULL; // Optional sender information
-&nbsp;&nbsp;&nbsp;char *session_info=NULL; // Optional session information
-&nbsp;&nbsp;&nbsp;char *request_id=NULL; // Optional request ID
-&nbsp;&nbsp;&nbsp;int type=0; // Optional type information
-
-&nbsp;&nbsp;&nbsp;// Retrieve app data from noti
-&nbsp;&nbsp;&nbsp;ret = push_service_get_notification_data(noti, &amp;data);
-&nbsp;&nbsp;&nbsp;// Decrypt app data here if it is encrypted
-
-&nbsp;&nbsp;&nbsp;// Retrieve notification message from noti
-&nbsp;&nbsp;&nbsp;ret = push_service_get_notification_message(noti, &amp;msg);
-
-&nbsp;&nbsp;&nbsp;// Retrieve the time when notification is created from noti
-&nbsp;&nbsp;&nbsp;ret = push_service_get_notification_time(noti, &amp;time_stamp);
-
-&nbsp;&nbsp;&nbsp;// Retrieve the optional information
-&nbsp;&nbsp;&nbsp;ret = push_service_get_notification_sender(noti, &amp;sender);
-&nbsp;&nbsp;&nbsp;ret = push_service_get_notification_session_info(noti, &amp;session_info);
-&nbsp;&nbsp;&nbsp;ret = push_service_get_notification_request_id(noti, &amp;request_id);
-&nbsp;&nbsp;&nbsp;ret = push_service_get_notification_type(noti, &amp;type);
-
-&nbsp;&nbsp;&nbsp;// Use data, msg, time_stamp, sender,
-&nbsp;&nbsp;&nbsp;// session_info, request_id, and type as needed
-
-&nbsp;&nbsp;&nbsp;// Free all resources
-&nbsp;&nbsp;&nbsp;// Do not free noti in the callback function
-&nbsp;&nbsp;&nbsp;if (data)    
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(data);
-&nbsp;&nbsp;&nbsp;if (msg)     
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(msg);
-&nbsp;&nbsp;&nbsp;if (sender)  
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(sender);
-&nbsp;&nbsp;&nbsp;if (session_info)    
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(session_info);
-&nbsp;&nbsp;&nbsp;if (request_id)      
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(request_id);
+&nbsp;&nbsp;&nbsp;&nbsp;int ret;
+
+&nbsp;&nbsp;&nbsp;&nbsp;char *data=NULL; /* App data loaded on the notification */
+&nbsp;&nbsp;&nbsp;&nbsp;char *msg=NULL; /* Noti message */
+&nbsp;&nbsp;&nbsp;&nbsp;long long int time_stamp; /* Time when the noti is generated */
+&nbsp;&nbsp;&nbsp;&nbsp;char *sender=NULL; /* Optional sender information */
+&nbsp;&nbsp;&nbsp;&nbsp;char *session_info=NULL; /* Optional session information */
+&nbsp;&nbsp;&nbsp;&nbsp;char *request_id=NULL; /* Optional request ID */
+&nbsp;&nbsp;&nbsp;&nbsp;int type=0; /* Optional type information */
+
+&nbsp;&nbsp;&nbsp;&nbsp;/* Retrieve app data from noti */
+&nbsp;&nbsp;&nbsp;&nbsp;ret = push_service_get_notification_data(noti, &amp;data);
+&nbsp;&nbsp;&nbsp;&nbsp;/* Decrypt app data here if it is encrypted */
+
+&nbsp;&nbsp;&nbsp;&nbsp;/* Retrieve notification message from noti */
+&nbsp;&nbsp;&nbsp;&nbsp;ret = push_service_get_notification_message(noti, &amp;msg);
+
+&nbsp;&nbsp;&nbsp;&nbsp;/* Retrieve the time when notification is created from noti */
+&nbsp;&nbsp;&nbsp;&nbsp;ret = push_service_get_notification_time(noti, &amp;time_stamp);
+
+&nbsp;&nbsp;&nbsp;&nbsp;/* Retrieve the optional information */
+&nbsp;&nbsp;&nbsp;&nbsp;ret = push_service_get_notification_sender(noti, &amp;sender);
+&nbsp;&nbsp;&nbsp;&nbsp;ret = push_service_get_notification_session_info(noti, &amp;session_info);
+&nbsp;&nbsp;&nbsp;&nbsp;ret = push_service_get_notification_request_id(noti, &amp;request_id);
+&nbsp;&nbsp;&nbsp;&nbsp;ret = push_service_get_notification_type(noti, &amp;type);
+
+&nbsp;&nbsp;&nbsp;&nbsp;/*
+&nbsp;&nbsp;&nbsp;&nbsp;   Use data, msg, time_stamp, sender,
+&nbsp;&nbsp;&nbsp;&nbsp;   session_info, request_id, and type as needed
+&nbsp;&nbsp;&nbsp;&nbsp;*/
+
+&nbsp;&nbsp;&nbsp;&nbsp;/* Free all resources */
+&nbsp;&nbsp;&nbsp;&nbsp;/* Do not free noti in the callback function */
+&nbsp;&nbsp;&nbsp;&nbsp;if (data)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(data);
+&nbsp;&nbsp;&nbsp;&nbsp;if (msg)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(msg);
+&nbsp;&nbsp;&nbsp;&nbsp;if (sender)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(sender);
+&nbsp;&nbsp;&nbsp;&nbsp;if (session_info)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(session_info);
+&nbsp;&nbsp;&nbsp;&nbsp;if (request_id)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(request_id);
 }
 </pre>
 </li>
@@ -612,41 +608,36 @@ _noti_cb(push_service_notification_h noti, void *user_data)
 <p>If the application is not launched by the push service, this function returns as <span style="font-family: Courier New,Courier,monospace;">NULL</span>.</p>
 
 <pre class="prettyprint">
-static void 
+static void
 app_control(app_control_h app_control, void *data)
 {
-&nbsp;&nbsp;&nbsp;char *op = NULL;
-&nbsp;&nbsp;&nbsp;push_service_notification_h noti = NULL;
-&nbsp;&nbsp;&nbsp;int ret;
-
-&nbsp;&nbsp;&nbsp;if (app_control_get_operation(app_control, &amp;op) &lt; 0) 
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
-&nbsp;&nbsp;&nbsp;}
-       
-&nbsp;&nbsp;&nbsp;// Retrieve the noti from the bundle
-&nbsp;&nbsp;&nbsp;ret = push_service_app_control_to_notification(app_control, op, &amp;noti);
-
-&nbsp;&nbsp;&nbsp;if (noti)
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Handle the noti
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Free the noti
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;push_service_free_notification(noti);
-&nbsp;&nbsp;&nbsp;}
-&nbsp;&nbsp;&nbsp;else 
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Case when the application is not launched by the push service
-&nbsp;&nbsp;&nbsp;}
-&nbsp;&nbsp;&nbsp;if (op)
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(op);
+&nbsp;&nbsp;&nbsp;&nbsp;char *op = NULL;
+&nbsp;&nbsp;&nbsp;&nbsp;push_service_notification_h noti = NULL;
+&nbsp;&nbsp;&nbsp;&nbsp;int ret;
+
+&nbsp;&nbsp;&nbsp;&nbsp;if (app_control_get_operation(app_control, &amp;op) &lt; 0)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+
+&nbsp;&nbsp;&nbsp;&nbsp;/* Retrieve the noti from the bundle */
+&nbsp;&nbsp;&nbsp;&nbsp;ret = push_service_app_control_to_notification(app_control, op, &amp;noti);
+
+&nbsp;&nbsp;&nbsp;&nbsp;if (noti) {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Handle the noti */
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Free the noti */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;push_service_free_notification(noti);
+&nbsp;&nbsp;&nbsp;&nbsp;} else {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Case when the application is not launched by the push service */
+&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;if (op)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(op);
 }
 </pre></li>
 <li>Store the notification at the push service database and request it later when the application is launched.
 <p>You need to set the action to <span style="font-family: Courier New,Courier,monospace;">ALERT</span> or <span style="font-family: Courier New,Courier,monospace;">SILENT</span> in the message field when sending the notification from the application server. When such a notification arrives at the device, the push service keeps the notification in the database and waits for the request from the application.</p>
 <p>The difference between the <span style="font-family: Courier New,Courier,monospace;">ALERT</span> and <span style="font-family: Courier New,Courier,monospace;">SILENT</span> actions is that the former shows an alert message in the quick panel and changes the badge count, while the latter does not. If the user clicks the alert message in the quick panel, the push service <a href="#force_launch">forcibly launches the application</a> and delivers the notification through the app control callback function.</p></li>
 <li>Discard it.
-<p>You need to set the action to <span style="font-family: Courier New,Courier,monospace;">DISCARD </span>in the message field when sending the notification from the application server. When such a notification arrives at the device, the push service discards the notification unless the application is running.</p></li>
+<p>You need to set the action to <span style="font-family: Courier New,Courier,monospace;">DISCARD</span> in the message field when sending the notification from the application server. When such a notification arrives at the device, the push service discards the notification unless the application is running.</p></li>
 </ul>
 </li>
 
@@ -658,13 +649,12 @@ app_control(app_control_h app_control, void *data)
 <pre class="prettyprint">
 push_service_notification_h noti;
 int ret;
-do 
-{
-&nbsp;&nbsp;&nbsp;ret = push_service_get_unread_notification(push_conn, &amp;noti);
+do {
+&nbsp;&nbsp;&nbsp;&nbsp;ret = push_service_get_unread_notification(push_conn, &amp;noti);
 
-&nbsp;&nbsp;&nbsp;// Process the unread message noti
+&nbsp;&nbsp;&nbsp;&nbsp;/* Process the unread message noti */
 
-&nbsp;&nbsp;&nbsp;push_server_free_notification(&amp;noti);
+&nbsp;&nbsp;&nbsp;&nbsp;push_server_free_notification(&amp;noti);
 } while (1);
 </pre>