2

I would like to insert a new raw contact. I'm sure this involve some sort of getContentProvider().insert using a ContactsContract uri of some sort. Can anyone show an example using a ContentValues to to insert a brand new contact?

(Update) There is an excellent example in the SDK

http://developer.android.com/resources/samples/ContactManager/index.html

Noah Seidman
  • 4,359
  • 5
  • 26
  • 28

2 Answers2

2

Hey I was having the same problem. I hope this helps you. http://developer.android.com/reference/android/provider/ContactsContract.RawContacts.html

rogcg
  • 10,451
  • 20
  • 91
  • 133
1

if you want to add new contact to device, please make sure you have at one list account, and you must indicate this account by RawContact(ACcount Name, Account Type).

axel22
  • 32,045
  • 9
  • 125
  • 137
adsa
  • 11
  • 1