I want to query the contacts provider in android with a given number.
I have something like this
String queryString= "NUMBER='" + msgs[i].getOriginatingAddress() + "'";
Uri contacts = ContactsContract.CommonDataKinds.Phone.CONTENT_URI ;
Cursor cursor = context.getContentResolver().query(
contacts,
null, queryString, null,
null
);
then how do I go upon going to the first row? Like this?
cursor.getString(<how do i reference to the first row?>);
right?
Try this :
Hope this help!