问题
I am trying to add contacts to SIM Card, they seem to be added to the SIM Card but they're only visible after rebooting the device (even to the native People app)..
Here is the code I'm using:
final Uri uri = Uri.parse("content://icc/adn");
ContentValues mContentValue = new ContentValues();
mContentValue.put("tag", contactName);
mContentValue.put("number", contactNumber);
getContentResolver().insert(uri, mContentValue);
is it a problem with sync'ing the contacts db after creating the contacts? if so, is there a way, may be, to force android to sync the contacts' database with the SIM Card?
回答1:
Android contacts database synchronizes SIM Cards contacts on boot.
Any contacts added to the SIM card will be visible via the ContactsContract providers after reboot.
来源:https://stackoverflow.com/questions/24485735/when-adding-contacts-to-sim-card-they-are-only-displayed-after-rebooting-the-de