public class Contact extends Object
Represents a Contact entry from the device Address Book.
The sample below demonstrates listing all the contacts within the device with their photos
Constructor and Description |
---|
Contact()
Empty Constructor
|
Modifier and Type | Method and Description |
---|---|
Hashtable |
getAddresses()
Gets the Contact Addresses, the Hashtable contains key/value pairs where
the key is a String which represents the type of the Address, types can
be: "home", "work", "other" the value is an Address Object.
|
long |
getBirthday()
Gets the Contact birthday
|
String |
getDisplayName()
Gets the Contact Display Name
|
Hashtable |
getEmails()
Gets the Contact Emails, the Hashtable contains key/value pairs where
the key is a String which represents the type of the Email, types can
be: "home", "mobile", "work", "other" the value is String of the email.
|
String |
getFamilyName()
Gets Contact family name
|
String |
getFirstName()
Gets Contact First Name
|
String |
getId()
Gets the Contact unique id
|
String[] |
getLinkedContactIds()
Returns the IDs of all contacts that are linked to this contact.
|
String |
getNote()
Gets Contact Note
|
Hashtable |
getPhoneNumbers()
Gets the Contact phone numbers, the Hashtable contains key/value pairs where
the key is a String which represents the type of the phone number, types can
be: "home", "mobile", "work", "fax", "other" the value is String of the
phone number.
|
Image |
getPhoto()
Gets the Contact photo
|
String |
getPrimaryEmail()
Gets the primary email of this Contact, notice this can be null even though
the Contact has emails declared
|
String |
getPrimaryPhoneNumber()
Gets the primary phone number of this Contact, notice this can be null
even though the Contact has phone numbers declared
|
String[] |
getUrls()
Gets Contact urls
|
void |
setAddresses(Hashtable addresses)
Sets the Contact Addresses
|
void |
setBirthday(long birthday)
Sets the Contact birthday date
|
void |
setDisplayName(String displayName)
Sets the Contact display name
|
void |
setEmails(Hashtable emails)
Sets the Contact emails
|
void |
setFamilyName(String familyName)
Sets Contact family name
|
void |
setFirstName(String name)
Sets Contact first name
|
void |
setId(String id)
Sets the Contact unique id
|
void |
setNote(String note)
Sets Contact note
|
void |
setPhoneNumbers(Hashtable phoneNumbers)
Sets Contact phone numbers
|
void |
setPhoto(Image photo)
Sets Contact photo
|
void |
setPrimaryEmail(String primaryEmail)
Sets Contact primary email
|
void |
setPrimaryPhoneNumber(String primaryPhoneNumber)
Sets Contact primary phone number
|
void |
setUrls(String[] urls)
Sets Contact urls
|
public Hashtable getAddresses()
public long getBirthday()
public String getDisplayName()
public Hashtable getEmails()
public String getId()
public String getFirstName()
public String getFamilyName()
public String getNote()
public Hashtable getPhoneNumbers()
public Image getPhoto()
public String getPrimaryEmail()
public String getPrimaryPhoneNumber()
public void setAddresses(Hashtable addresses)
addresses
- the Hashtable contains key/value pairs where
the key is a String which represents the type of the Address, types can
be: "home", "work", "other" the value is an Address Object.public void setBirthday(long birthday)
birthday
- public void setDisplayName(String displayName)
displayName
- public void setEmails(Hashtable emails)
emails
- the Hashtable contains key/value pairs where
the key is a String which represents the type of the Email, types can
be: "home", "mobile", "work", "other" the value is String of the email.public void setId(String id)
id
- public void setFirstName(String name)
name
- public void setFamilyName(String familyName)
familyName
- public void setNote(String note)
note
- public void setPhoneNumbers(Hashtable phoneNumbers)
phoneNumbers
- the Hashtable contains key/value pairs where
the key is a String which represents the type of the phone number, types can
be: "home", "mobile", "work", "fax", "other" the value is String of the
phone number.public void setPhoto(Image photo)
photo
- public void setPrimaryEmail(String primaryEmail)
primaryEmail
- public void setPrimaryPhoneNumber(String primaryPhoneNumber)
primaryPhoneNumber
- public String[] getUrls()
public void setUrls(String[] urls)
urls
- public String[] getLinkedContactIds()