I am using custom adapter extending cursor adapter for displaying data in listview, to display particular phone number i have passed the id to a method in database class but
First check this Condition before fetching data
if(cursor!=null && cursor.getCount()>0){ cursor.moveToFirst(); num = cursor.getString(cursor.getColumnIndex("ContactNumber")); }