The “Notify Registration Event” is used to indicate a new registration. It notifies, via Mobile SDK, when a user registers in the app using the method Connectif.sendRegister(email: String).
How to use
The registration notification uses the method Connectif.sendRegister(email: String), in which we add the email property of the user registering.
Attribute | Definition | Required | Type | Limitations |
---|---|---|---|---|
Valid email of the registering user. |
Yes | String |
- A valid email must have a username, followed by @, a domain, and an extension, with no spaces or special characters. - Maximum of 200 characters. |
|
contactInfo |
Additional user information |
No | RegisterContactInfo |
RegisterContactInfo Structure
Attribute | Definition | Required | Type | Limitations |
---|---|---|---|---|
name |
Name |
No | String | |
surname |
Surname |
No | String | |
birthdate |
Birthdate |
No | Date | |
mobilePhone |
Mobile phone number |
No | String | Must include a valid country code (e.g., +34) |
newsletterSubscriptionStatus |
Newsletter subscription status |
No | SubscriptionStatus | The status can be SUBSCRIBED or NONE |
smsSubscriptionStatus |
SMS subscription status |
No | SubscriptionStatus | The status can be SUBSCRIBED or NONE |
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:
val contactInfo = RegisterContactInfo(
name = "John",
surname = "Doe",
birthdate = Date(),
mobilePhone = "123456789",
newsletterSubscriptionStatus = SubscriptionStatus.SUBSCRIBED,
smsSubscriptionStatus = SubscriptionStatus.NONE
)
Connectif.sendRegister("useremail@example.com", contactInfo)
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 make the most 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 push notification sending and receiving through the Android Mobile SDK.
- iOS SDK Get Started, to add Connectif Mobile SDK to your iOS project.
- Apple Push Notifications Service Configuration, to enable push notification sending and receiving through the iOS Mobile SDK.