1
 private fun addContactToSim(number: String, name: String) {
        try {

            val simUri = Uri.parse("content://icc/adn")
            val cv = ContentValues()
            cv.put("tag", name)
            cv.put("number", number)
            cv.put("email", "Email")
            context.getContentResolver().insert(simUri, cv)
            context.getContentResolver().notifyChange(simUri, null)
        } catch (e: Exception) {
            e.printStackTrace()
        }
    }

this code tried to save or create contact to sim but i want save contact based on option like if we select sim 1 it should save in sim1 if we select sim 2 it should save sim 2 can any one suggest me how to get this plz help i am stucking from long time in this issue.

Shubhamhackz
  • 7,333
  • 7
  • 50
  • 71
Manoj Kumar
  • 97
  • 1
  • 1
  • 10

0 Answers0