Android Mobile SDK: Notify Registration Event

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
email

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
    }
}

 

 

 

Congratulations!
You have reached the end of the lesson.

  

Do you have unresolved questions?
Remember that our Connectif specialists are available to help. To contact them, simply open a ticket with Support by clicking the blue "Help" button in your dashboard.


Keep learning!

To make the most of your Connectif account, we recommend continuing with the following articles:

 
Was this article helpful?
0 out of 0 found this helpful