Blueshift Configuration

Configuration is an important class where you set all the values required by the SDK to work properly. You will need to pass a valid instance of this class to initialise the Blueshift Android SDK.

There are two mandatory values you need to set inside configuration object before initialisation. They are app icon and api key. Rest of the methods are optional. However you can make use of them to customise the SDK based on your requirements.

App Icon

Setting an app icon is required to display the notifications.



API key is required for accessing blueshift end point to send your events.



Blueshift Android SDK supports category based deep-link. SDK will look for specific categories in the payload and will land the user to the activities corresponding to the actions.

Ex: If user clicks on Buy button in a notification they will be taken to the Cart page. This cart page must be specified in the configuration when initialising the SDK to get this working.


Please note that if the deep_link_url is present in the payload, it will have higher priority. Hence the deep-link using category will not work. SDK will always open the MAIN/LAUNCHER activity and pass the deep_link_url inside bundle.


Following optional methods will let you style the notification.


Set the custom icons for notification. You can specify both small and big icons using resource ids.



From API level 21, Android supports setting color for notification. Following method will let the developer configure the color of notification rendered by Blueshift Android SDK



 From Android Oreo, the notification framework requires a channel to be defined when you create a notification. If channel is not present, Oreo will skip the notification.

// Optional: if not set and not found in payload,
// SDK will assign a default id (bsft_channel_General).

// Optional: if not set and not found in payload,
// SDK will assign a default name (General).

// optional: only set if present in payload or config object

Batch Interval

SDK sends the events to a bulk event API if marked as batch events. The batched events are sent in a default interval of 30min. You can override the same as given below.

// == Batched Events (Optional) ==
* This is the time interval used for batching events which are then
* sent to Blueshift using the bulk events api call. It defaults to
* 30 min if not set.
* It is recommended to use one of the following for API < 19 devices.
* AlarmManager.INTERVAL_HOUR
* AlarmManager.INTERVAL_DAY


In-App Message Interval

You can configure the time interval between two in-app messages. By default, the value is 1 min. To change that, call the following method while initializing the SDK. 


If multiple ini-app messages are queued for the user, the next in-app message will be displayed after 1 min (or the time you set) from the moment the user dismisses the current in-app message.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request