Adjoe.init(String, Object)
when your app is starting, for example in your App.js
's componentDidMount()
method. The init
method will return a promise which resolves when the SDK has been initialized successfully and rejects with an optional error parameter when an error occurred during the initialization.
The SDK initialization should be started as soon as possible after the app comes to foreground to make sure that all adjoe features are available when you want to use them.componentDidMount
method.null
or an empty object.Adjoe.getUserId()
.