0

Like the Title,I feel puzzled about that. eg:

Uri contactData = data.getData();
String [] projection ={Phone.NUMBER};
Cursor c = getContentResolver().query(contactData, projection, null, null, null);
c.moveToFirst();
int column = c.getColumnIndex(Phone.NUMBER);
String num = c.getString(column);  
Konstantin Yovkov
  • 62,134
  • 8
  • 100
  • 147
JohnTsai
  • 5
  • 1

1 Answers1

0

The Cursor you get from query starts out before the first record.

So in order to use it, you need to put it somewhere.

Thilo
  • 257,207
  • 101
  • 511
  • 656