问题
I am trying to create an application which will add contact details like phone number, email address and name in the phone's address book, but I have not idea how to do this. I know that we can access the contact details from the address book, but how can we add any new contacts from our application to the address book?
How can this be done?
回答1:
Look at http://developer.android.com/resources/articles/contacts.html
under Example: Inserting a Phone Number
Update/Edit:
Above mentioned url isn't valid anymore. I guess this page is the most relevant now: http://developer.android.com/guide/topics/providers/contacts-provider.html
回答2:
As I understood it, android contacts are read only.
Edit: Actually it looks like you can modify and create new contacts. http://developer.android.com/guide/topics/providers/contacts-provider.html
来源:https://stackoverflow.com/questions/6665359/how-to-save-contact-details-in-the-phones-address-book-from-any-application