java.lang.Object | |
↳ | com.neomades.contact.Contact |
This class represents a contact: it stores information like name, phone
number, email address, postal address...
You must use ContactManager
class to create, edit or show contacts of
the device.
android.provider.ContactsContract.CommonDataKinds
.ABPerson
.Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Contact() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String |
getCity()
Returns the contact's city.
| ||||||||||
String |
getCountry()
Returns the contact's country.
| ||||||||||
String |
getDisplayName()
Returns the name that should be used to display the contact.
| ||||||||||
String |
getEmailAddress()
Returns the contact's default email address for type
HOME . | ||||||||||
String |
getEmailAddress(int type)
Returns the contact's email address for the chosen type
EmailKind . | ||||||||||
String |
getFirstName()
Returns the contact's first name.
| ||||||||||
String |
getFullPostalAddress()
Returns the contact's default full postal address for type
HOME . | ||||||||||
String |
getFullPostalAddress(int type)
Returns the contact's full postal address for the chosen type
{@link AddressKind).
| ||||||||||
int |
getId()
Returns the identifier of this contact, by default all contacts return "0".
| ||||||||||
String |
getLastName()
Returns the contact's last name.
| ||||||||||
String |
getMiddleName()
Returns the contact's middle name.
| ||||||||||
String |
getNamePrefix()
Returns the contact's name prefix.
| ||||||||||
String |
getNameSuffix()
Returns the contact's name suffix.
| ||||||||||
String |
getNickname()
Returns the contact's nickname.
| ||||||||||
String |
getPhoneNumber()
Returns the contact's default phone number for type
MOBILE . | ||||||||||
String |
getPhoneNumber(int type)
Returns the contact's phone number for the chosen type (
PhoneKind ). | ||||||||||
String |
getPostalCode()
Returns the contact's postal code.
| ||||||||||
String |
getState()
Returns the contact's state.
| ||||||||||
String |
getStreet()
Returns the contact's street.
| ||||||||||
void |
setCity(String city)
Sets the contact's city.
| ||||||||||
void |
setCountry(String country)
Sets the contact's country name or code.
| ||||||||||
void |
setDisplayName(String displayName)
Sets the contact's display name.
| ||||||||||
void |
setEmailAddress(String emailAddress, int type)
Sets the contact's email address and its type
EmailKind . | ||||||||||
void |
setEmailAddress(String emailAddress)
Sets the contact's email address for type
HOME . | ||||||||||
void |
setFirstName(String firstName)
Sets the contact's first name.
| ||||||||||
void |
setFullPostalAddress(String fullPostalAddress)
Sets the contact's postal address for type
HOME . | ||||||||||
void | setFullPostalAddress(String fullPostalAddress, int type) | ||||||||||
void |
setId(int id)
Sets a identifier/tag to this contact
| ||||||||||
void |
setLastName(String lastName)
Sets the contact's last name.
| ||||||||||
void |
setMiddleName(String middleName)
Sets the contact's middle name.
| ||||||||||
void |
setNamePrefix(String namePrefix)
Sets the contact's honorific prefix, as "Sir","Mr" or "Mrs".
| ||||||||||
void |
setNameSuffix(String nameSuffix)
Sets the contact's honorific suffix, as "Jr".
| ||||||||||
void |
setNickname(String nickname)
Sets the contact's nickname.
| ||||||||||
void |
setPhoneNumber(String phoneNumber, int type)
Sets the contact's phone number, and its type
PhoneKind . | ||||||||||
void |
setPhoneNumber(String phoneNumber)
Sets the contact's phone number for type
MOBILE . | ||||||||||
void |
setPostalCode(String postalCode)
Sets the contact's postal code.
| ||||||||||
void |
setState(String state)
Sets the contact's state.
| ||||||||||
void |
setStreet(String street)
Sets the contact's street.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Returns the contact's city.
Returns the contact's country.
Returns the name that should be used to display the contact.
Returns the contact's default email address for type HOME
.
Returns the contact's email address for the chosen type EmailKind
.
type | the email address type to return |
---|
Returns the contact's first name.
Returns the contact's default full postal address for type
HOME
.
Returns the contact's full postal address for the chosen type {@link AddressKind).
type | the postal address type to return |
---|
Returns the identifier of this contact, by default all contacts return "0".
Returns the contact's last name.
Returns the contact's middle name.
Returns the contact's name prefix.
Returns the contact's name suffix.
Returns the contact's nickname.
Returns the contact's default phone number for type MOBILE
.
Returns the contact's phone number for the chosen type (PhoneKind
).
type | the phone number type to return |
---|
Returns the contact's postal code.
Returns the contact's state.
Returns the contact's street.
Sets the contact's city. It can be city, village, town, borough, etc.
city | city of the contact (if null , empty String is set)
|
---|
Sets the contact's country name or code.
country | country of the contact (if null , empty String is set)
|
---|
Sets the contact's display name.
displayName | full name of the contact (if null , empty String is set) |
---|
Sets the contact's email address and its type EmailKind
.
emailAddress | email address of the contact (if null , empty String is
set) |
---|---|
type | the email address type |
IllegalArgumentException | if the type doesn't exist |
---|
Sets the contact's email address for type HOME
.
emailAddress | email address of the contact (if null , empty String is
set) |
---|
IllegalArgumentException | if the type doesn't exist |
---|
Sets the contact's first name.
firstName | first name of the contact (if null , empty String is set) |
---|
Sets the contact's postal address for type HOME
.
fullPostalAddress | full postal address of the contact (if null , empty String
is set) |
---|
IllegalArgumentException | if the type doesn't exist |
---|
fullPostalAddress | full postal address of the contact (if null , empty String
is set) |
---|---|
type | the address type |
IllegalArgumentException | if the type doesn't exist |
---|
Sets the contact's last name.
lastName | last name of the contact (if null , empty String is set) |
---|
Sets the contact's middle name.
middleName | middle name of the contact (if null , empty String is set) |
---|
Sets the contact's honorific prefix, as "Sir","Mr" or "Mrs".
namePrefix | name prefix of the contact (if null , empty String is set) |
---|
Sets the contact's honorific suffix, as "Jr".
nameSuffix | name suffix of the contact (if null , empty String is set) |
---|
Sets the contact's nickname.
nickname | nickname of the contact (if null , empty String is set) |
---|
Sets the contact's phone number, and its type PhoneKind
.
phoneNumber | phone number of the contact (if null , empty String is set) |
---|---|
type | the phone number type |
IllegalArgumentException | if the type doesn't exist |
---|
Sets the contact's phone number for type MOBILE
.
phoneNumber | phone number of the contact (if null , empty String is set) |
---|
IllegalArgumentException | if the type doesn't exist |
---|
Sets the contact's postal code. Usually country-wide, but sometimes specific to the city.
postalCode | postal code of the contact (if null , empty String is set)
|
---|
Sets the contact's state. It can be a state, province, county (in Ireland), Land (in Germany), department (in France), etc.
state | state/region of the contact (if null , empty String is set)
|
---|
Sets the contact's street. It can be street, avenue, road, etc. This element also includes the house number and room/apartment/flat/floor number.
street | street of the contact (if null , empty String is set)
|
---|