Return PackageManager instance to find global package information.
1. Declare a PackageManager object named myPackageManager.
2. In the onCreate method, add the below line. This will return a PackageManager instance and save it to the PackageManager object named myPackageManager.
myPackageManager = getPackageManager();
3. Compile and run!
Resources:
Professional Android 4 Application Development by Reto Meier, pg 702
http://developer.android.com/reference/android/content/Context.html#getPackageManager()