How to Get a Reference to NotificationManager

public abstract Object getSystemService (String name) was added in API level 1
Return the handle to a system-level service by name. The class of the returned object varies by the requested name.

1. In the MainActivity.java file, Save the NotificationServce to a string named svcName.

2. Declare a new NotificationManager named myNotificationManager

3. In the onCreate method, add the following line. This will get a reference to the NotificationManager and save it to myNotificationManager.

myNotificationManager = (NotificationManager)getSystemService(svcName);

4. Compile and run!

Next Recommended Article: How to Save a Drawable to an Integer object

Resources:
http://developer.android.com/reference/android/content/Context.html#getSystemService(java.lang.String)