I am making an app in which I have to retrieve the phone number and I am able to retrieve it but my problem is that I am getting phone number of las
please modify your query with
cur = context.getContentResolver().query(Calls.CONTENT_URI, projection, null, null, Calls.DATE +" desc"); cur.moveToFirst(); s = cur.getString(numberColumn);
it will give last call's phone number and there is no need requery so many times