Created
October 22, 2010 05:00
-
-
Save skatldjs/639961 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.provider.Contacts.People; | |
| private void getColumnData(Cursor cur){ | |
| if (cur.moveToFirst()) { | |
| String name; | |
| String phoneNumber; | |
| int nameColumn = cur.getColumnIndex(People.NAME); | |
| int phoneColumn = cur.getColumnIndex(People.NUMBER); | |
| String imagePath; | |
| do { | |
| // Get the field values | |
| name = cur.getString(nameColumn); | |
| phoneNumber = cur.getString(phoneColumn); | |
| // Do something with the values. | |
| ... | |
| } while (cur.moveToNext()); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment