How can I read CONTACT ID and VERSION of Contacts?
Can anybody tell how to get highest value of RawContacts.VERSION and its RawContacts.CONTACT_ID

it should be liked follows.

SELECT MAX(RawContacts.VERSION),RawContacts.CONTACT_ID FROM RawContacts.CONTENT_URI

   

 

    final String[] projection = new String[] {"MAX("+RawContacts.VERSION+")"+,RawContacts.CONTACT_ID};
        Cursor curval =this.getApplicationContext().getContentResolver().query(RawContacts.CONTENT_URI, projection, null, null,null);
		

I have created cursor but i dont know how to add projection according to above scenario.

please help me
Thank you
How can I read CONTACT ID and VERSION of Contacts?
===

Can anybody tell how to get highest value of RawContacts.VERSION and its RawContacts.CONTACT_ID

it should be liked follows.

SELECT MAX(RawContacts.VERSION),RawContacts.CONTACT_ID FROM RawContacts.CONTENT_URI

   

 

    final String[] projection = new String[] {"MAX("+RawContacts.VERSION+")"+,RawContacts.CONTACT_ID};
        Cursor curval =this.getApplicationContext().getContentResolver().query(RawContacts.CONTENT_URI, projection, null, null,null);
		

I have created cursor but i dont know how to add projection according to above scenario.

please help me
Thank you