This document contains SDK setup process for both Android and iOS device. Further, we'll cover basic and advanced methods to track user properties, events and push tokens from frontend clients. With the help of this SDK, you will be able to send Communication directly from your app, and render push notifications on both android and iOS devices.
For a better understanding of how to trigger a communication using your frontend SDK, we first need to understand how SuprSend sends communications to the end users. This is what a typical communication flow looks like
Communications are made up of 5 major components - templates, vendors, end users, trigger and workflows. All of these components are defined below:
Template contains the message content that needs to be sent. You can manage your templates on the SuprSend dashboard. This gives you the flexibility of making changes in the message content without changing anything in the code. You can create a template on SuprSend dashboard by following our Templates documentation
Users are your end recipients who need to be notified. Users are identified by a unique identifier distinct_id on SuprSend platform. There can be multiple channels attached to a user profile. Notification will be sent to active channels in a user profile. For example - If your template contains a message corresponding to SMS and email channels, but your user profile contains information relating only to email channels, only email will be sent. We'll learn more about how to add a user and their channel preferences in this document
Vendors are the channel providers through which your messages will be routed. SuprSend only requires you to add your vendor configurations to start sending notifications. Messages will always be routed through the default vendor set on SuprSend dashboard. You can configure your vendors by following our vendor configurations guides
Workflow combines all the communication elements (like user, trigger, template, vendor, etc) and adds a business logic to it to determine how / when the notification should be triggered
Trigger initiates the workflow. There are two ways in which you can trigger a workflow:
- Event-based trigger: where you design the workflow on Suprsend platform and pass event from SDK as a trigger point.
- From API: Configure all the workflow components (users, template name, business logic etc) including the business logic in an API payload and trigger workflow through API. (We'll not cover this method here as it is triggered using backend SDK)
For most usecases, event-based triggers are recommended as most of the workflow elements are not tied to the code, and can be easily modified through SuprSend dashboard without changing anything in the code.
In this documentation , we'll cover:
- How to integrate android SDK
- How to create User profile and add user channel preferences to it
- How to send and track events for triggering event based workflows
- How to render android push notification using firebase
Updated 7 months ago