I have used the code form the answers mentioned in the question How to get All Sim Contacts in Android Progrmmatically?
But for my use case I want to fetch the contacts from SIM only (from both SIMs in case it is a dual SIM phone).
When I use
Uri simUri = Uri.parse("content://icc/adn");
I am getting the contacts from active SIM only