“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 } }
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 via 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 via the iOS Mobile SDK.