Fyno’s Android (Kotlin) Push Notification SDK comes with the ability to provide its users with a multitude of notification features, all bundled into one, allowing it to smartly provide the best and optimised message delivery service from within your application itself.
In order to get started, there are a few prerequisites that needs to be in place:
This step essentially explains how and where to place the Fyno SDK in your repository in order to have the SDK correctly initialised.
To integrate Fyno Android SDK, initialise Fyno SDK in MainActivity/MainApplication inside onCreate method.
onCreate allows the SDK to collect the device details and user profile details and transmits this information to your Fyno account to:
Fyno Core initialises the context between your android application and Fyno, which has all the required configurations needed for FynoSDK, FynoPush and FynoCallback to work and helps with profiling the users as well.
Adding Dependencies: Add following line inside dependencies in app build gradle
Initialisation: Fyno Core SDK is responsible for initialising the context to save Fyno configurations and user profiling.
FynoCore.initialize(this, "WSID", "APIKEY")FynoUser.identify("Distinct_Id")Fyno Push handles incoming push notification requests from Fyno and renders the customised push message with different templates as configured in Fyno platform. This library takes care of Push Amplification, if enabled.
Adding Dependencies: Add following line inside dependencies in app build gradle. Also, download the google-services.json from Firebase console and place it in the root folder as per FCM Documentations
Initialisation: Fyno Push SDK is responsible for handling push rendering and push amplification.
FynoCore you have to call FynoCore.initilize(this, "WSID", "APIKEY")FynoPush.registerPush methodFyno Push SDK is responsible for sending push callbacks to Fyno by calling FynoCallback.updateStatus method. The above method required 2 required parameters and 1 optional parameter
callback_url - Required parameter - You can get the callback_urlfrom the notification additional payload if the notification triggered from Fyno.
status - Required parameter - status of the push notification to be notified to Fyno. It is of type MessageStatus. The possible message statuses that you can receive are:
MessageStatus.RECEIVEDMessageStatus.OPENEDMessageStatus.CLICKEDMessageStatus.DISMISSEDAdditional parameters - optional parameters, like device details can be captured here.
We all love features that can be mixed and matched! Fyno is a firm believer of this and has made our Callback feature with this in mind.
While the callback_url feature works effortlessly through the Fyno Android Push Notification SDK without any additional setup needed, when used independently, you can also use only this piece to get your notification status, which can be found in the data payload of your notification.