S slowtime Active Member Licensed User Longtime User Oct 29, 2013 #1 Hi, contactUtils Public Sub InsertContact(Name As String, Phone As String) As cuContact Click to expand... let you insert only the name and phone of new contact. How to insert Last Name, Second Name and Title ? Thank you in advance. Ciao
Hi, contactUtils Public Sub InsertContact(Name As String, Phone As String) As cuContact Click to expand... let you insert only the name and phone of new contact. How to insert Last Name, Second Name and Title ? Thank you in advance. Ciao
Erel B4X founder Staff member Licensed User Longtime User Oct 29, 2013 #2 Edit ContactUtils class. Find this code in InsertContact: B4X: values.Initialize values.PutLong("raw_contact_id", rawContactId) values.PutString("mimetype", "vnd.android.cursor.item/name") values.PutString("data1", Name) This code sets the "display name" field. You can add other fields. For example to add the family name: http://developer.android.com/refere...mmonDataKinds.StructuredName.html#FAMILY_NAME B4X: values.PutString("data3", "<Family Name>") Upvote 0
Edit ContactUtils class. Find this code in InsertContact: B4X: values.Initialize values.PutLong("raw_contact_id", rawContactId) values.PutString("mimetype", "vnd.android.cursor.item/name") values.PutString("data1", Name) This code sets the "display name" field. You can add other fields. For example to add the family name: http://developer.android.com/refere...mmonDataKinds.StructuredName.html#FAMILY_NAME B4X: values.PutString("data3", "<Family Name>")
S slowtime Active Member Licensed User Longtime User Oct 29, 2013 #3 Thank you. You are great. Ciao. Upvote 0