Doc change: sample app for Notifications class

Change-Id: Iaa45156f333e5b8e9bc9cc596900835540ff138e
diff --git a/samples/training/notify-user/AndroidManifest.xml b/samples/training/notify-user/AndroidManifest.xml
new file mode 100644
index 0000000..70cf094
--- /dev/null
+++ b/samples/training/notify-user/AndroidManifest.xml
@@ -0,0 +1,51 @@
+<!--
+  Copyright (C) 2012 The Android Open Source Project
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.pingme"
+    android:versionCode="1"
+    android:versionName="1.0" >
+
+    <uses-sdk
+        android:minSdkVersion="4"
+        android:targetSdkVersion="15" />
+    <uses-permission android:name="android.permission.VIBRATE"/>
+
+    <application
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:description="@string/app_description">
+        android:theme="@style/AppTheme" >
+        <activity
+            android:name=".MainActivity"
+            android:label="@string/label" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <service
+            android:name="PingService"
+            android:label="PingServiceLabel" android:enabled="true">
+        </service>
+        <activity
+            android:name="ResultActivity"
+            android:label="Take Action"
+            android:launchMode="singleTask"
+            android:taskAffinity=""
+            android:excludeFromRecents="true"/>
+    </application>
+</manifest>
\ No newline at end of file
diff --git a/samples/training/notify-user/res/drawable-hdpi-v11/ic_stat_dismiss.png b/samples/training/notify-user/res/drawable-hdpi-v11/ic_stat_dismiss.png
new file mode 100644
index 0000000..af02f6a
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-hdpi-v11/ic_stat_dismiss.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-hdpi-v11/ic_stat_ic_stat_snooze.png b/samples/training/notify-user/res/drawable-hdpi-v11/ic_stat_ic_stat_snooze.png
new file mode 100644
index 0000000..8eb93b8
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-hdpi-v11/ic_stat_ic_stat_snooze.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-hdpi-v11/ic_stat_notification.png b/samples/training/notify-user/res/drawable-hdpi-v11/ic_stat_notification.png
new file mode 100644
index 0000000..ea3d989
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-hdpi-v11/ic_stat_notification.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-hdpi-v11/ic_stat_snooze.png b/samples/training/notify-user/res/drawable-hdpi-v11/ic_stat_snooze.png
new file mode 100644
index 0000000..2e86efc
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-hdpi-v11/ic_stat_snooze.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-hdpi-v9/ic_stat_dismiss.png b/samples/training/notify-user/res/drawable-hdpi-v9/ic_stat_dismiss.png
new file mode 100644
index 0000000..2fb9cbe
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-hdpi-v9/ic_stat_dismiss.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-hdpi-v9/ic_stat_ic_stat_snooze.png b/samples/training/notify-user/res/drawable-hdpi-v9/ic_stat_ic_stat_snooze.png
new file mode 100644
index 0000000..a48ed76
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-hdpi-v9/ic_stat_ic_stat_snooze.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-hdpi-v9/ic_stat_notification.png b/samples/training/notify-user/res/drawable-hdpi-v9/ic_stat_notification.png
new file mode 100644
index 0000000..a4d6739
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-hdpi-v9/ic_stat_notification.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-hdpi-v9/ic_stat_snooze.png b/samples/training/notify-user/res/drawable-hdpi-v9/ic_stat_snooze.png
new file mode 100644
index 0000000..4f9145c
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-hdpi-v9/ic_stat_snooze.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-hdpi/ic_action_search.png b/samples/training/notify-user/res/drawable-hdpi/ic_action_search.png
new file mode 100644
index 0000000..67de12d
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-hdpi/ic_action_search.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-hdpi/ic_launcher.png b/samples/training/notify-user/res/drawable-hdpi/ic_launcher.png
new file mode 100644
index 0000000..294ad90
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-hdpi/ic_stat_dismiss.png b/samples/training/notify-user/res/drawable-hdpi/ic_stat_dismiss.png
new file mode 100644
index 0000000..754c040
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-hdpi/ic_stat_dismiss.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-hdpi/ic_stat_notification.png b/samples/training/notify-user/res/drawable-hdpi/ic_stat_notification.png
new file mode 100644
index 0000000..14aee92
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-hdpi/ic_stat_notification.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-hdpi/ic_stat_snooze.png b/samples/training/notify-user/res/drawable-hdpi/ic_stat_snooze.png
new file mode 100644
index 0000000..5167e85
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-hdpi/ic_stat_snooze.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-ldpi-v11/ic_stat_dismiss.png b/samples/training/notify-user/res/drawable-ldpi-v11/ic_stat_dismiss.png
new file mode 100644
index 0000000..0782556
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-ldpi-v11/ic_stat_dismiss.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-ldpi-v11/ic_stat_ic_stat_snooze.png b/samples/training/notify-user/res/drawable-ldpi-v11/ic_stat_ic_stat_snooze.png
new file mode 100644
index 0000000..2ea46c4
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-ldpi-v11/ic_stat_ic_stat_snooze.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-ldpi-v11/ic_stat_notification.png b/samples/training/notify-user/res/drawable-ldpi-v11/ic_stat_notification.png
new file mode 100644
index 0000000..7d25b1a
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-ldpi-v11/ic_stat_notification.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-ldpi-v11/ic_stat_snooze.png b/samples/training/notify-user/res/drawable-ldpi-v11/ic_stat_snooze.png
new file mode 100644
index 0000000..100bf70
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-ldpi-v11/ic_stat_snooze.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-ldpi-v9/ic_stat_dismiss.png b/samples/training/notify-user/res/drawable-ldpi-v9/ic_stat_dismiss.png
new file mode 100644
index 0000000..73630cf
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-ldpi-v9/ic_stat_dismiss.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-ldpi-v9/ic_stat_ic_stat_snooze.png b/samples/training/notify-user/res/drawable-ldpi-v9/ic_stat_ic_stat_snooze.png
new file mode 100644
index 0000000..667765e
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-ldpi-v9/ic_stat_ic_stat_snooze.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-ldpi-v9/ic_stat_notification.png b/samples/training/notify-user/res/drawable-ldpi-v9/ic_stat_notification.png
new file mode 100644
index 0000000..f39c4a1
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-ldpi-v9/ic_stat_notification.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-ldpi-v9/ic_stat_snooze.png b/samples/training/notify-user/res/drawable-ldpi-v9/ic_stat_snooze.png
new file mode 100644
index 0000000..100bf70
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-ldpi-v9/ic_stat_snooze.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-ldpi/ic_launcher.png b/samples/training/notify-user/res/drawable-ldpi/ic_launcher.png
new file mode 100644
index 0000000..2106354
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-ldpi/ic_launcher.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-ldpi/ic_stat_dismiss.png b/samples/training/notify-user/res/drawable-ldpi/ic_stat_dismiss.png
new file mode 100644
index 0000000..326338e
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-ldpi/ic_stat_dismiss.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-ldpi/ic_stat_notification.png b/samples/training/notify-user/res/drawable-ldpi/ic_stat_notification.png
new file mode 100644
index 0000000..b182c97
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-ldpi/ic_stat_notification.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-ldpi/ic_stat_snooze.png b/samples/training/notify-user/res/drawable-ldpi/ic_stat_snooze.png
new file mode 100644
index 0000000..dd24bb9
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-ldpi/ic_stat_snooze.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-mdpi-v11/ic_stat_dismiss.png b/samples/training/notify-user/res/drawable-mdpi-v11/ic_stat_dismiss.png
new file mode 100644
index 0000000..98d4fe3
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-mdpi-v11/ic_stat_dismiss.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-mdpi-v11/ic_stat_ic_stat_snooze.png b/samples/training/notify-user/res/drawable-mdpi-v11/ic_stat_ic_stat_snooze.png
new file mode 100644
index 0000000..cb9cf10
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-mdpi-v11/ic_stat_ic_stat_snooze.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-mdpi-v11/ic_stat_notification.png b/samples/training/notify-user/res/drawable-mdpi-v11/ic_stat_notification.png
new file mode 100644
index 0000000..b9f19c4
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-mdpi-v11/ic_stat_notification.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-mdpi-v11/ic_stat_snooze.png b/samples/training/notify-user/res/drawable-mdpi-v11/ic_stat_snooze.png
new file mode 100644
index 0000000..0e82c6c
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-mdpi-v11/ic_stat_snooze.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-mdpi-v9/ic_stat_dismiss.png b/samples/training/notify-user/res/drawable-mdpi-v9/ic_stat_dismiss.png
new file mode 100644
index 0000000..9ca48f8
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-mdpi-v9/ic_stat_dismiss.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-mdpi-v9/ic_stat_ic_stat_snooze.png b/samples/training/notify-user/res/drawable-mdpi-v9/ic_stat_ic_stat_snooze.png
new file mode 100644
index 0000000..e4f3ef6
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-mdpi-v9/ic_stat_ic_stat_snooze.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-mdpi-v9/ic_stat_notification.png b/samples/training/notify-user/res/drawable-mdpi-v9/ic_stat_notification.png
new file mode 100644
index 0000000..6543866
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-mdpi-v9/ic_stat_notification.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-mdpi-v9/ic_stat_snooze.png b/samples/training/notify-user/res/drawable-mdpi-v9/ic_stat_snooze.png
new file mode 100644
index 0000000..605b409
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-mdpi-v9/ic_stat_snooze.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-mdpi/ic_action_search.png b/samples/training/notify-user/res/drawable-mdpi/ic_action_search.png
new file mode 100644
index 0000000..134d549
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-mdpi/ic_action_search.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-mdpi/ic_launcher.png b/samples/training/notify-user/res/drawable-mdpi/ic_launcher.png
new file mode 100644
index 0000000..9471112
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-mdpi/ic_stat_dismiss.png b/samples/training/notify-user/res/drawable-mdpi/ic_stat_dismiss.png
new file mode 100644
index 0000000..a07fd97
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-mdpi/ic_stat_dismiss.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-mdpi/ic_stat_notification.png b/samples/training/notify-user/res/drawable-mdpi/ic_stat_notification.png
new file mode 100644
index 0000000..c09a5c0
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-mdpi/ic_stat_notification.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-mdpi/ic_stat_snooze.png b/samples/training/notify-user/res/drawable-mdpi/ic_stat_snooze.png
new file mode 100644
index 0000000..893257d
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-mdpi/ic_stat_snooze.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-xhdpi-v11/ic_launcher.png b/samples/training/notify-user/res/drawable-xhdpi-v11/ic_launcher.png
new file mode 100644
index 0000000..5328ebd
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-xhdpi-v11/ic_launcher.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-xhdpi-v11/ic_stat_dismiss.png b/samples/training/notify-user/res/drawable-xhdpi-v11/ic_stat_dismiss.png
new file mode 100644
index 0000000..de02f97
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-xhdpi-v11/ic_stat_dismiss.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-xhdpi-v11/ic_stat_ic_stat_snooze.png b/samples/training/notify-user/res/drawable-xhdpi-v11/ic_stat_ic_stat_snooze.png
new file mode 100644
index 0000000..cdac9fa
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-xhdpi-v11/ic_stat_ic_stat_snooze.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-xhdpi-v11/ic_stat_notification.png b/samples/training/notify-user/res/drawable-xhdpi-v11/ic_stat_notification.png
new file mode 100644
index 0000000..1497b50
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-xhdpi-v11/ic_stat_notification.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-xhdpi-v11/ic_stat_snooze.png b/samples/training/notify-user/res/drawable-xhdpi-v11/ic_stat_snooze.png
new file mode 100644
index 0000000..01490c8
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-xhdpi-v11/ic_stat_snooze.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-xhdpi-v9/ic_stat_dismiss.png b/samples/training/notify-user/res/drawable-xhdpi-v9/ic_stat_dismiss.png
new file mode 100644
index 0000000..8668cbe
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-xhdpi-v9/ic_stat_dismiss.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-xhdpi-v9/ic_stat_ic_stat_snooze.png b/samples/training/notify-user/res/drawable-xhdpi-v9/ic_stat_ic_stat_snooze.png
new file mode 100644
index 0000000..30f0e9b
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-xhdpi-v9/ic_stat_ic_stat_snooze.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-xhdpi-v9/ic_stat_notification.png b/samples/training/notify-user/res/drawable-xhdpi-v9/ic_stat_notification.png
new file mode 100644
index 0000000..3ef12d7
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-xhdpi-v9/ic_stat_notification.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-xhdpi-v9/ic_stat_snooze.png b/samples/training/notify-user/res/drawable-xhdpi-v9/ic_stat_snooze.png
new file mode 100644
index 0000000..55ae2b4
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-xhdpi-v9/ic_stat_snooze.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-xhdpi/ic_action_search.png b/samples/training/notify-user/res/drawable-xhdpi/ic_action_search.png
new file mode 100644
index 0000000..d699c6b
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-xhdpi/ic_action_search.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-xhdpi/ic_launcher.png b/samples/training/notify-user/res/drawable-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..faa0d15
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-xhdpi/ic_stat_notification.png b/samples/training/notify-user/res/drawable-xhdpi/ic_stat_notification.png
new file mode 100644
index 0000000..16506b6
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-xhdpi/ic_stat_notification.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-xhdpi/ic_stat_snooze.png b/samples/training/notify-user/res/drawable-xhdpi/ic_stat_snooze.png
new file mode 100644
index 0000000..b5260e3
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-xhdpi/ic_stat_snooze.png
Binary files differ
diff --git a/samples/training/notify-user/res/drawable-xxhdpi/ic_launcher.png b/samples/training/notify-user/res/drawable-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..f05a126
--- /dev/null
+++ b/samples/training/notify-user/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/samples/training/notify-user/res/layout/activity_main.xml b/samples/training/notify-user/res/layout/activity_main.xml
new file mode 100644
index 0000000..6ca51a0
--- /dev/null
+++ b/samples/training/notify-user/res/layout/activity_main.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent" >
+
+    <TextView
+        android:id="@+id/seconds_view"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentTop="true"
+        android:layout_centerHorizontal="true"
+        android:layout_marginTop="32dp"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:text="@string/ping_text" />
+
+    <EditText
+        android:id="@+id/edit_seconds"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_below="@+id/seconds_view"
+        android:layout_centerHorizontal="true"
+        android:layout_marginTop="15dp"
+        android:ems="10"
+        android:text="@string/seconds_default"
+        android:inputType="numberSigned">
+
+        <requestFocus />
+    </EditText>
+
+    <TextView
+        android:id="@+id/reminder_view"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_below="@+id/edit_seconds"
+        android:layout_centerHorizontal="true"
+        android:layout_marginTop="40dp"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:text="@string/reminder_label" />
+
+    <EditText
+        android:id="@+id/edit_reminder"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignLeft="@+id/edit_seconds"
+        android:layout_below="@+id/reminder_view"
+        android:layout_marginTop="15dp"
+        android:ems="10"
+        android:text="@string/reminder_text"
+        android:inputType="textMultiLine" />
+
+    <Button
+        android:id="@+id/ping_button"
+        style="?android:attr/buttonStyleSmall"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_below="@+id/edit_reminder"
+        android:layout_centerHorizontal="true"
+        android:layout_marginTop="25dp"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:onClick="onPingClick"
+        android:text="@string/ping" />
+
+</RelativeLayout>
\ No newline at end of file
diff --git a/samples/training/notify-user/res/layout/activity_result.xml b/samples/training/notify-user/res/layout/activity_result.xml
new file mode 100644
index 0000000..d2d7a0d
--- /dev/null
+++ b/samples/training/notify-user/res/layout/activity_result.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent" >
+
+    <TextView
+        android:id="@+id/result_message"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_centerHorizontal="true"
+        android:layout_centerInParent="true"
+        android:textAppearance="?android:attr/textAppearanceMedium" />
+
+    <RelativeLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_below="@+id/result_message"
+        android:layout_centerInParent="true" >
+
+      <Button
+          android:id="@+id/dismiss_button"
+          android:layout_width="wrap_content"
+          android:layout_height="wrap_content"
+          android:onClick="onDismissClick"
+          android:text="@string/dismiss" />
+
+      <Button
+          android:id="@+id/snooze_button"
+          android:layout_width="wrap_content"
+          android:layout_height="wrap_content"
+          android:layout_alignBottom="@+id/dismiss_button"
+          android:layout_toRightOf="@+id/dismiss_button"
+          android:onClick="onSnoozeClick"
+          android:text="@string/snooze" />
+      </RelativeLayout>
+</RelativeLayout>
+
diff --git a/samples/training/notify-user/res/values-large/dimens.xml b/samples/training/notify-user/res/values-large/dimens.xml
new file mode 100644
index 0000000..5c4a502
--- /dev/null
+++ b/samples/training/notify-user/res/values-large/dimens.xml
@@ -0,0 +1,7 @@
+<resources>
+
+    <dimen name="padding_small">8dp</dimen>
+    <dimen name="padding_medium">16dp</dimen>
+    <dimen name="padding_large">16dp</dimen>
+
+</resources>
\ No newline at end of file
diff --git a/samples/training/notify-user/res/values/dimens.xml b/samples/training/notify-user/res/values/dimens.xml
new file mode 100644
index 0000000..ec96646
--- /dev/null
+++ b/samples/training/notify-user/res/values/dimens.xml
@@ -0,0 +1,7 @@
+<resources>
+
+    <dimen name="padding_small">8dp</dimen>
+    <dimen name="padding_medium">8dp</dimen>
+    <dimen name="padding_large">16dp</dimen>
+
+</resources>
\ No newline at end of file
diff --git a/samples/training/notify-user/res/values/strings.xml b/samples/training/notify-user/res/values/strings.xml
new file mode 100644
index 0000000..130c95b
--- /dev/null
+++ b/samples/training/notify-user/res/values/strings.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright (C) 2012 The Android Open Source Project
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+
+<resources>
+
+    <string name="app_name">PingMe</string>
+    <string name="app_description">Notification sample.</string>
+    <string name="menu_settings">Settings</string>
+    <string name="title_activity_main">MainActivity</string>
+    <string name="notification">Ping Notification</string>
+    <string name="label">Ping Me</string>
+
+    <!--  Buttons -->
+    <string name="ping">Ping!</string>
+    <string name="snooze">Snooze</string>
+    <string name="dismiss">Dismiss</string>
+
+    <!--  Text Views -->
+
+    <string name="ping_text">Set Seconds Until Ping</string>
+    <string name="done_snoozing">Done Snoozing.</string>
+    <string name="seconds_default">10</string>
+    <string name="reminder_label">Reminder Text</string>
+    <string name="reminder_text">Don\'t forget!</string>
+
+    <!--  Logging -->
+
+    <string name="snoozing">Snoozing!</string>
+    <string name="timer_start">Setting the timer</string>
+    <string name="sleep_error">Sleep failure</string>
+    <string name="timer_finished">Timer finished.</string>
+
+</resources>
+
+
diff --git a/samples/training/notify-user/res/values/styles.xml b/samples/training/notify-user/res/values/styles.xml
new file mode 100644
index 0000000..8f35c28
--- /dev/null
+++ b/samples/training/notify-user/res/values/styles.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+    <style name="AppTheme" parent="android:Theme.Light" />
+
+    <style name="NotificationText">
+      <item name="android:textColor">?android:attr/textColorPrimary</item>
+    </style>
+    <style name="NotificationTitle">
+      <item name="android:textColor">?android:attr/textColorPrimary</item>
+      <item name="android:textStyle">bold</item>
+    </style>
+    <!-- If you want a slightly different color for some text,
+         consider using ?android:attr/textColorSecondary -->
+</resources>
\ No newline at end of file
diff --git a/samples/training/notify-user/src/com/example/android/pingme/CommonConstants.java b/samples/training/notify-user/src/com/example/android/pingme/CommonConstants.java
new file mode 100644
index 0000000..e446884
--- /dev/null
+++ b/samples/training/notify-user/src/com/example/android/pingme/CommonConstants.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.example.android.pingme;
+
+/**
+ *
+ * A set of constants used by all of the components in this application. To use these constants
+ * the components implement the interface.
+ */
+
+public final class CommonConstants {
+
+    public CommonConstants() {
+
+        // don't allow the class to be instantiated
+    }
+
+    // Milliseconds in the snooze duration, which translates
+    // to 20 seconds.
+    public static final int SNOOZE_DURATION = 20000;
+    public static final int DEFAULT_TIMER_DURATION = 10000;
+    public static final String ACTION_SNOOZE = "com.example.android.pingme.ACTION_SNOOZE";
+    public static final String ACTION_DISMISS = "com.example.android.pingme.ACTION_DISMISS";
+    public static final String ACTION_PING = "com.example.android.pingme.ACTION_PING";
+    public static final String EXTRA_MESSAGE= "com.example.android.pingme.EXTRA_MESSAGE";
+    public static final String EXTRA_TIMER = "com.example.android.pingme.EXTRA_TIMER";
+    public static final int NOTIFICATION_ID = 001;
+    public static final String DEBUG_TAG = "PingMe";
+}
diff --git a/samples/training/notify-user/src/com/example/android/pingme/MainActivity.java b/samples/training/notify-user/src/com/example/android/pingme/MainActivity.java
new file mode 100644
index 0000000..66727cd
--- /dev/null
+++ b/samples/training/notify-user/src/com/example/android/pingme/MainActivity.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.example.android.pingme;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.EditText;
+import android.widget.Toast;
+
+public class MainActivity extends Activity {
+
+    private Intent mServiceIntent;
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+
+        // Creates an explicit Intent to start the service that constructs and
+        // issues the notification.
+        mServiceIntent = new Intent(getApplicationContext(), PingService.class);
+    }
+
+    /*
+     * Gets the values the user entered and adds them to the intent that will be
+     * used to launch the IntentService that runs the timer and issues the
+     * notification.
+     */
+    public void onPingClick(View v) {
+        int seconds;
+
+        // Gets the reminder text the user entered.
+        EditText msgText = (EditText) findViewById(R.id.edit_reminder);
+        String message = msgText.getText().toString();
+
+        mServiceIntent.putExtra(CommonConstants.EXTRA_MESSAGE, message);
+        mServiceIntent.setAction(CommonConstants.ACTION_PING);
+        Toast.makeText(this, R.string.timer_start, Toast.LENGTH_SHORT).show();
+
+        // The number of seconds the timer should run.
+        EditText editText = (EditText)findViewById(R.id.edit_seconds);
+        String input = editText.getText().toString();
+
+        if(input == null || input.trim().equals("")){
+            // If user didn't enter a value, sets to default.
+            seconds = R.string.seconds_default;
+        } else {
+            seconds = Integer.parseInt(input);
+        }
+        int milliseconds = (seconds * 1000);
+        mServiceIntent.putExtra(CommonConstants.EXTRA_TIMER, milliseconds);
+        // Launches IntentService "PingService" to set timer.
+        startService(mServiceIntent);
+    }
+}
diff --git a/samples/training/notify-user/src/com/example/android/pingme/PingService.java b/samples/training/notify-user/src/com/example/android/pingme/PingService.java
new file mode 100644
index 0000000..aa01c97
--- /dev/null
+++ b/samples/training/notify-user/src/com/example/android/pingme/PingService.java
@@ -0,0 +1,146 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.example.android.pingme;
+
+import android.app.IntentService;
+import android.app.Notification;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.content.Intent;
+import android.support.v4.app.NotificationCompat;
+import android.util.Log;
+
+/**
+ * PingService creates a notification that includes 2 buttons: one to snooze the
+ * notification, and one to dismiss it.
+ */
+public class PingService extends IntentService {
+
+    private NotificationManager mNotificationManager;
+    private String mMessage;
+    private int mMillis;
+    NotificationCompat.Builder builder;
+
+    public PingService() {
+
+        // The super call is required. The background thread that IntentService
+        // starts is labeled with the string argument you pass.
+        super("com.example.android.pingme");
+    }
+
+    @Override
+    protected void onHandleIntent(Intent intent) {
+        // The reminder message the user set.
+        mMessage = intent.getStringExtra(CommonConstants.EXTRA_MESSAGE);
+        // The timer duration the user set. The default is 10 seconds.
+        mMillis = intent.getIntExtra(CommonConstants.EXTRA_TIMER,
+                CommonConstants.DEFAULT_TIMER_DURATION);
+        NotificationManager nm = (NotificationManager)
+                getSystemService(NOTIFICATION_SERVICE);
+
+        String action = intent.getAction();
+        // This section handles the 3 possible actions:
+        // ping, snooze, and dismiss.
+        if(action.equals(CommonConstants.ACTION_PING)) {
+            issueNotification(intent, mMessage);
+        } else if (action.equals(CommonConstants.ACTION_SNOOZE)) {
+            nm.cancel(CommonConstants.NOTIFICATION_ID);
+            Log.d(CommonConstants.DEBUG_TAG, getString(R.string.snoozing));
+            // Sets a snooze-specific "done snoozing" message.
+            issueNotification(intent, getString(R.string.done_snoozing));
+
+        } else if (action.equals(CommonConstants.ACTION_DISMISS)) {
+            nm.cancel(CommonConstants.NOTIFICATION_ID);
+        }
+    }
+
+    private void issueNotification(Intent intent, String msg) {
+        mNotificationManager = (NotificationManager)
+                getSystemService(NOTIFICATION_SERVICE);
+
+        // Sets up the Snooze and Dismiss action buttons that will appear in the
+        // expanded view of the notification.
+        Intent dismissIntent = new Intent(this, PingService.class);
+        dismissIntent.setAction(CommonConstants.ACTION_DISMISS);
+        PendingIntent piDismiss = PendingIntent.getService(this, 0, dismissIntent, 0);
+
+        Intent snoozeIntent = new Intent(this, PingService.class);
+        snoozeIntent.setAction(CommonConstants.ACTION_SNOOZE);
+        PendingIntent piSnooze = PendingIntent.getService(this, 0, snoozeIntent, 0);
+
+        // Constructs the Builder object.
+        builder =
+                new NotificationCompat.Builder(this)
+                .setSmallIcon(R.drawable.ic_stat_notification)
+                .setContentTitle(getString(R.string.notification))
+                .setContentText(getString(R.string.ping))
+                .setDefaults(Notification.DEFAULT_ALL) // requires VIBRATE permission
+                /*
+                 * Sets the big view "big text" style and supplies the
+                 * text (the user's reminder message) that will be displayed
+                 * in the detail area of the expanded notification.
+                 * These calls are ignored by the support library for
+                 * pre-4.1 devices.
+                 */
+                .setStyle(new NotificationCompat.BigTextStyle()
+                     .bigText(msg))
+                .addAction (R.drawable.ic_stat_dismiss,
+                        getString(R.string.dismiss), piDismiss)
+                .addAction (R.drawable.ic_stat_snooze,
+                        getString(R.string.snooze), piSnooze);
+
+        /*
+         * Clicking the notification itself displays ResultActivity, which provides
+         * UI for snoozing or dismissing the notification.
+         * This is available through either the normal view or big view.
+         */
+         Intent resultIntent = new Intent(this, ResultActivity.class);
+         resultIntent.putExtra(CommonConstants.EXTRA_MESSAGE, msg);
+         resultIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
+
+         // Because clicking the notification opens a new ("special") activity, there's
+         // no need to create an artificial back stack.
+         PendingIntent resultPendingIntent =
+                 PendingIntent.getActivity(
+                 this,
+                 0,
+                 resultIntent,
+                 PendingIntent.FLAG_UPDATE_CURRENT
+         );
+
+         builder.setContentIntent(resultPendingIntent);
+         startTimer(mMillis);
+    }
+
+    private void issueNotification(NotificationCompat.Builder builder) {
+        mNotificationManager = (NotificationManager)
+                getSystemService(NOTIFICATION_SERVICE);
+        // Including the notification ID allows you to update the notification later on.
+        mNotificationManager.notify(CommonConstants.NOTIFICATION_ID, builder.build());
+    }
+
+ // Starts the timer according to the number of seconds the user specified.
+    private void startTimer(int millis) {
+        Log.d(CommonConstants.DEBUG_TAG, getString(R.string.timer_start));
+        try {
+            Thread.sleep(millis);
+
+        } catch (InterruptedException e) {
+            Log.d(CommonConstants.DEBUG_TAG, getString(R.string.sleep_error));
+        }
+        Log.d(CommonConstants.DEBUG_TAG, getString(R.string.timer_finished));
+        issueNotification(builder);
+    }
+}
diff --git a/samples/training/notify-user/src/com/example/android/pingme/ResultActivity.java b/samples/training/notify-user/src/com/example/android/pingme/ResultActivity.java
new file mode 100644
index 0000000..a27a704
--- /dev/null
+++ b/samples/training/notify-user/src/com/example/android/pingme/ResultActivity.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.example.android.pingme;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.TextView;
+
+/**
+ * This Activity is displayed when users click the notification itself. It provides
+ * UI for snoozing and dismissing the notification.
+ */
+public class ResultActivity extends Activity {
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_result);
+        String message = getIntent().getStringExtra(CommonConstants.EXTRA_MESSAGE);
+        TextView text = (TextView) findViewById(R.id.result_message);
+        text.setText(message);
+    }
+
+    public void onSnoozeClick(View v) {
+        Intent intent = new Intent(getApplicationContext(), PingService.class);
+        intent.setAction(CommonConstants.ACTION_SNOOZE);
+        startService(intent);
+    }
+
+    public void onDismissClick(View v) {
+        Intent intent = new Intent(getApplicationContext(), PingService.class);
+        intent.setAction(CommonConstants.ACTION_DISMISS);
+        startService(intent);
+    }
+}
+