I want to read all sim contacts and phone contacts separately in Android. I searched for this and found lots of people having problem with this and I couldn’t find any solution yet. I fond some answer here, but it doesn’t work for me.
When I test this it give me google contacts:
RawContacts.ACCOUNT_TYPE + " = 'com.google' "
But when I test this it does not give me sim contacts:
RawContacts.ACCOUNT_TYPE + " = 'com.android.contacts.sim' "
Then I found RawContacts are contacts that created by sync adapter in here. That may be the problem. So can anyone tell me the way of getting
- All simcontacts
- All phone contacts
Thanks.
for Phone contacts
for sim contacts
String ClsSimPhonename = null;
String ClsSimphoneNo = null;