How to get All Sim Contacts in Android programmatically?

android, android-contacts

Solution

Uri simUri = Uri.parse("content://icc/adn");

  Cursor cursorSim = this.getContentResolver().query(simUri, null, null,null, null);

         while (cursorSim.moveToNext()) {           
             listName.add(cursorSim.getString(cursorSim.getColumnIndex("name")));
             listContactId.add(cursorSim.getString(cursorSim.getColumnIndex("_id")));      
             listMobileNo.add(cursorSim.getString(cursorSim.getColumnIndex("number")));
            }

simply now following code to get the simcard details..It works fine

Problem

How to list sim contacts in Android programmatically? I got the code to get phone contacts here but I need sim contacts too with this.

Original source

Related problems