title: How to create Contact to Sim Programmatically in Android
body: <pre><code>private fun addContactToSim(number:String,name:String) {
      try {        
          val simUri = Uri.parse("content://icc/adn")
          val values = ContentValues()
          values.put("number", number)
          values.put("tag", name)
          context.getContentResolver().insert(simUri, values)
      }
      catch (e:Exception)
      {
          e.printStackTrace()
      }
  }
  </code></pre>
  
  <p>This function I am using to create contact to sim am calling this function in  <code>onCreate()</code> with single contact   addContactToSim("MyTestNumber","9028340932")  like this but contact is not saving to sim I am unable to see contact in sim please suggest me what I am doing wrong.</p>