android - Accessing the contact Content Provider -
i tring access contact content provider. wrote following code cursor cur= getcontentresolver().query(contactscontract.contacts.content_uri, null,null,null,null); startmanagingcursor(cur); string[] result=new string[cur.getcount()]; if(cur.movetofirst()) { int nameidx=cur.getcolumnindexorthrow(contactscontract.contacts.display_name); int ididx=cur.getcolumnindexorthrow(contactscontract.contacts._id); string strname=cur.getstring(nameidx); string strid=cur.getstring(ididx); result[cur.getposition()]=strname+"("+strid+")"; }while(cur.movetonext()); stopmanagingcursor(cur); } but showing 1 contact name want show contact available please tell me how that. try instead cursor cur= getcontentresolver().query(contactscontract.contacts.content_uri, null,null,null,null); startmanagingcursor(cur); string[] result=new string[cur.getcount()]; (boolean hasdata = cursor.movetofirst(); hasdata;...