Being able to create a contact is nice, but you really need for them to have more information than just a name in order to be useful. So, for the next step, add some telephone numbers to the contacts. If you are familiar with the Address Book application already, and you should be, then you know that a contact can have multiple phone numbers—each with a different role or locations. After having seen how the NAME
field is handled, you may well assume that the telephone field, named TEL
, would operate in the same manner; as a StringArray
type.
You would be wrong though.
When it comes to the TEL
field each field is a simple String
and is given an additional attribute defining which kind of phone number it is. Let's take a look at this with the following code.