I did following code for deleting selected contacts from sim card. but its not deleting and also not throwing any error.
2 Answers 2
You are deleting the contacts from the sqlite database and not the SIM card. For deleting contacts from the SIM card, you need to delete on Uri.parse("content://icc/adn") uri only. But for deletion you need to provide both name and number. Name column has to specified as tag. Check for delete method here https://android.googlesource.com/platform/frameworks/opt/telephony/+/9ebea45a36838f0547a9c30f7cd9c60b03aab3b4/src/java/com/android/internal/telephony/IccProvider.java
Based on my answer here, here is the solution :
Off course, don't forget these permissions :