1. Start the sim contact to import the phone intent
// SIM import intent importintent = new intent (intent. action_view); importintent. settype ("Vnd. android. cursor. item/Sim-contact "); importintent. setclassname ("com. android. phone "," com. android. phone. simcontacts "); startactivity (importintent );
2. Read SIM card contacts
Cursor cursor = getsimcontacts (); While (cursor! = NULL & cursor. movetonext () {string name = cursor. getstring (cursor. getcolumnindex ("name"); string number = cursor. getstring (cursor. getcolumnindex ("Number");} private cursor getsimcontacts () {// run query URI uri = Uri. parse ("content: // ICC/ADN"); // contacts. people. content_uri; // URI uri = Uri. parse ("content: // SIM/ADN"); string [] projection = new string [] {"name", "phone"}; string selection = NULL; string [] selectionargs = NULL; string sortorder = "name" // contacts. people. name /// contacts. lelecolumns. display_name + "collate localized ASC"; return managedquery (Uri, projection, selection, selectionargs, sortorder );}