com.bear.common.sdk / BearSdk

BearSdk

open class BearSdk

This class is used to initialize database and native libraries for BEAR SDK. BearSdk instance can be retrieved with getInstance method. To initiate BEAR SDK init method must be called in the android.app.Application.onCreate method.

Properties

androidId

val androidId: String

The UDID of the current device.

deviceId

val deviceId: Int

The id of the current device registered at Bear backend, 0 if not registered yet.

Functions

init

fun init(secretKey: String, isDev: Boolean = false): Unit

Initialize BEAR SDK. The secretKey must be provided for SDK initialization. This method must be called in the android.app.Application.onCreate method.

registerFirebaseToken

fun registerFirebaseToken(token: String): Unit

Provide the firebase notification token to SDK to register it in Bear backend. This method must be called to enabled push notifications.

Companion Object Functions

getInstance

fun getInstance(context: Context): BearSdk

Retrieve singleton instance of BearSdk.