Android Question ContactsUtils Custom Fields

walterf25

Expert
Licensed User
Longtime User
Hello everyone, does any one know how to create custom fields with this class, i have a list of contacts i need to download from an online service which dumps the data in CSV format, i have all this part figured out, but i need to add all this information to the device's contacts, i need to add 3 custom fields Player 1, Player 2, and Player 3, is there a way to create, i've tried to write a function copying the code to add Notes from the class but it doesn't seem to work.

B4X:
'Adds a player name to the custom field Player
Public Sub AddPlayer(Id As Long, player As String)
    Dim v As ContentValues
    v.Initialize
    v.PutString("data1", player)
    SetData("vnd.android.cursor.item/player", v, Id, True)
End Sub

Thanks in advanced for the help.

Regards,
Walter
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

walterf25

Expert
Licensed User
Longtime User
Upvote 0

walterf25

Expert
Licensed User
Longtime User
Upvote 0

walterf25

Expert
Licensed User
Longtime User
How do you see that your code doesn't work? The field you add will not appear in the contacts app. You should however be able to fetch it.
Hi Erel, you might be right, if that is the case, why won't the field appear in my contacts? and is there a way to make it show up?

Thanks,
Walter
 
Upvote 0
Top