init

fun init(application: Application, configuration: MindboxConfiguration, pushServices: List<MindboxPushService>)

Initializes the SDK for further work.

This method must be called synchronously in onCreate on an application class

If you must call it the other way, invoke Mindbox.setPushServiceHandler in Application.onCreate or else pushes won't be shown when application is inactive

Parameters

application

used to initialize the main tools

configuration

contains the data that is needed to connect to the Mindbox

pushServices

list, containing MindboxPushServices, i.e.

    listOf(MindboxFirebase, MindboxHuawei, MindboxRuStore)

fun init(activity: Activity, configuration: MindboxConfiguration, pushServices: List<MindboxPushService>)

Initializes the SDK for further work.

This method should be called in Activity.onCreate and should be used if you're unable to call Mindbox.init in Application.onCreate on an application class

If you use this method, invoke Mindbox.setPushServiceHandler in Application.onCreate or else pushes won't be shown when application is inactive

Parameters

activity

used to initialize the main tools

configuration

contains the data that is needed to connect to the Mindbox

pushServices

list, containing MindboxPushServices, i.e.

    listOf(MindboxFirebase, MindboxHuawei, MindboxRuStore)

fun init(context: Context, configuration: MindboxConfiguration, pushServices: List<MindboxPushService>)

Deprecated

Use either Mindbox.init with application parameter or Mindbox.init with activity parameter

Initializes the SDK for further work.

We recommend calling it synchronously in onCreate on an application class

If you must call it the other way, invoke Mindbox.setPushServiceHandler in Application.onCreate or else pushes won't be shown when application is inactive

Parameters

context

used to initialize the main tools

configuration

contains the data that is needed to connect to the Mindbox

pushServices

list, containing MindboxPushServices, i.e.

    listOf(MindboxFirebase, MindboxHuawei, MindboxRuStore)