The returned Cursor is a managed way of controlling the current position (row) in the query's result set. You can use a set of getter methods to extract values for each column in the current row. The People class offers convenience properties for each of the column indexes.
Iterate over the result set, extracting the name and address of each contact.
We have a Contact's name now. Next, we need to build a new query to retrieve the email address.
Finally, we close the first cursor.
Before Android lets you casually flip through the user's contact list you need to get permission. Permissions are a security mechanism that lets users decide what risks they're willing to take with a new app – kind off like UAC but without the continuous, repetitive, soul-destroying inevitability of UAC. Your AndroidManifest.xml file should have the <uses-permission android:name="android.permission.READ_CONTACTS" /> permission.