java.lang.Object | |
↳ | com.neomades.contact.ContactManager |
This class allows to manage contacts in the phone's address book through the
device contact interface.
To use this class, the WRITE_CONTACTS
, READ_CONTACTS
and
GET_ACCOUNTS
permissions must be declared in the URS file.
Get this object by calling the static method
getDefault()
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
addContact(ContactResultListener resultListener)
Open a native contact creation page.
| ||||||||||
void |
addContact(Contact contact, ContactResultListener resultListener)
Open a native contact creation page with prefilled fields.
| ||||||||||
void |
addContact()
Open a native contact creator page.
| ||||||||||
void |
addContact(Contact contact)
Open a native contact creator page with prefilled fields.
| ||||||||||
void |
editContact(Contact contact)
Open a native contact editor page.
| ||||||||||
void |
editContact(Contact contact, ContactResultListener resultListener)
Open a native contact editor page.
| ||||||||||
static ContactManager |
getDefault()
Returns the default instance of ContactManager.
| ||||||||||
void |
pickSingleContact(ContactResultListener resultListener)
Open a native contact picker page.
| ||||||||||
void |
showContact(Contact contact)
Open a native page that display contact information.
| ||||||||||
void |
showContact(Contact contact, ContactResultListener resultListener)
Open a native page that display contact information.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Open a native contact creation page. The look and the content of the page is
provided by the system and is platform dependent.
Application can be notified that the contact was added or not thanks to a
ContactResultListener
.
Android 4.0 (API version 14)
, a problem in
the new version of contacts app causes incorrect navigation.
When your app sends an insert intent to the contacts app and users fill and
save a contact, they will see the contact details screen (instead of going
back to your app).
To navigate back to your app, they have to click back button (but the contact
application will not return any data).
This issue is fixed in Android 4.0.3 (API version 15)
and later.
resultListener | callback to listen result of contact creation |
---|
Open a native contact creation page with prefilled fields.
The fields that can be prefilled are : First Name, Phone Number, E-Mail,
Postal Address, Company and Job Title. The look and the content of the page
is provided by the system and is platform dependent.
Application can be notified that the contact was added or not thanks to a
ContactResultListener
.
Android 4.0 (API version 14)
, a problem in
the new version of contacts app causes incorrect navigation.
When your app sends an insert intent to the contacts app and users fill and
save a contact, they will see the contact details screen (instead of going
back to your app).
To navigate back to your app, they have to click back button (but the contact
application will not return any data).
This issue is fixed in Android 4.0.3 (API version 15)
and later.
Open a native contact creator page. The look and the content of the page is provided by the system and is platform dependent.
Android 4.0 (API version 14)
, a problem in
the new version of contacts app causes incorrect navigation.
When your app sends an insert intent to the contacts app and users fill and
save a contact, they will see the contact details screen (instead of going
back to your app).
To navigate back to your app, they have to click back button (but the contact
application will not return any data).
This issue is fixed in Android 4.0.3 (API version 15)
and later.
Open a native contact creator page with prefilled fields. The fields that can be prefilled are : First Name, Phone Number, E-Mail, Postal Address, Company and Job Title. The look and the content of the page is provided by the system and is platform dependent.
Android 4.0 (API version 14)
, a problem in
the new version of contacts app causes incorrect navigation.
When your app sends an insert intent to the contacts app and users fill and
save a contact, they will see the contact details screen (instead of going
back to your app).
To navigate back to your app, they have to click back button (but the contact
application will not return any data).
This issue is fixed in Android 4.0.3 (API version 15)
and later.
Open a native contact editor page. This page will allow a user to modify an existing contact. The look and the content of the page is provided by the system and is platform dependent.
Android 4.0 (API version 14)
, a problem in
the new version of contacts app causes incorrect navigation.
When your app sends an edit intent to the contacts app and users edit and
save a contact, they will see the contact details screen (instead of going
back to your app).
To navigate back to your app, they have to click back button (but the contact
application will not return any data).
This issue is fixed in Android 4.0.3 (API version 15)
and later.
Open a native contact editor page. This page will allow a user to modify an
existing contact. Application can be notified that the contact was modified
or not thanks to a ContactResultListener
.
The look and the content of the page is provided by the system and is
platform dependent.
Android 4.0 (API version 14)
, a problem in
the new version of contacts app causes incorrect navigation.
When your app sends an edit intent to the contacts app and users edit and
save a contact, they will see the contact details screen (instead of going
back to your app).
To navigate back to your app, they have to click back button (but the contact
application will not return any data).
This issue is fixed in Android 4.0.3 (API version 15)
and later.
On iOS the ContactResultListener
is never called.
Returns the default instance of ContactManager.
SecurityException | if one of the three permissions to access contacts
(WRITE_CONTACTS , READ_CONTACTS or
GET_ACCOUNTS ) is missing.
|
---|
Open a native contact picker page. This page will allow a user to select a contact among all the contacts of the device. The look and the content of the page is provided by the system and is platform dependent.
resultListener | callback to listen result of "single contact" picker operation
(can be null )
|
---|
Open a native page that display contact information. Application can be
notified that the contact was displayed thanks to a
ContactResultListener
.
The look and the content of the page is provided by the system and is
platform dependent.