The “Notify contact information” event is used when we need to update contact information. To do this, via the Mobile SDK, we will use the sendContactInfo(contactInfo: ContactInfo) method.
How to use it
In the contact information submission, we will use the ContactInfo class and its properties to notify these user information changes with sendContactInfo(contactInfo: ContactInfo).
| Attribute | Definition | Required | Type | Limitations |
|---|---|---|---|---|
| contactInfo | Additional user information | YES | ContactInfo |
ContactInfo Structure
| Attribute | Definition | Required | Type | Limitations |
|---|---|---|---|---|
| name | First name | No | String | |
| surname | Last name | No | String | |
| birthdate | Birth date | No | Date | |
| mobilePhone | Mobile phone | No | String | Must include a valid country code prefix (e.g.: +34) |
This type of event automatically collects the following information:
- Operating system: Android or iOS.
- App version.
- Operating system version.
- Connectif SDK version.
Example
The notification will look like this:
Connectif.sendContactInfo(ContactInfo(
name = "John",
surname = "Doe",
birthdate = Date(),
mobilePhone = "+34675675677")
)
Callbacks (Optional)
If you want feedback on potential errors when sending events, you can add an EventCallbacks when using our method.
object : EventCallbacks {
override fun onSuccess() {
//Handle success
}
override fun onError(message: String?) {
//Handle error
}
}
Keep learning!
To fully harness the potential of your Connectif account, we recommend continuing with the following articles:
- Android SDK Get Started, to add Connectif Mobile SDK to your Android project.
- Firebase Cloud Messaging Configuration, to enable sending and receiving push notifications using the Android Mobile SDK.
- iOS SDK Get Started, to add Connectif Mobile SDK to your iOS project.
- Apple Push Notifications Service Configuration, to enable sending and receiving push notifications using the iOS Mobile SDK.