Android Mobile SDK: Notify Newsletter Subscription

“Newsletter subscription event” is used to indicate that a contact has subscribed to the newsletter. It notifies, via the Mobile SDK, when a contact performs this action and provides the subscription email using the function Connectif.subscribeToNewsletter().

 

How to use it

The newsletter subscription notification uses the email provided by one of the following methods, so at least one of them is required:

  • Logging in with the user (Login).
  • Registering a new user (Signup).
  • Starting the SDK and providing the user's email (Start the SDK).

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.subscribeToNewsletter()

 

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've reached the end of the lesson.

  

Do you still have unresolved questions?
Remember that our Connectif specialists are available to help. To contact them, simply open a support ticket by clicking the blue “Help” button on your dashboard.


Keep learning!

To fully harness the potential of your Connectif account, we recommend continuing with the following articles:

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