4. Initialization
Last updated
Last updated
This document refers to deprecated parts of the platform and has been left intact to help customers with legacy integrations. In order to access the latest platform features and documentation, please go to https://docs.sentiance.com.
Initialization is a very important step; before initialization, none of the methods on the Sentiance SDK interface will work, with the exception of , and .
Initialization in the onCreate()
method of your Application
class. If you don't already have a custom application class, first create a new class that extends Application
.
Then reference this new class in the application tag of the AndroidManifest.xml
In the onCreate()
method of your Application
class, call and pass the you created in the previous step, plus an instance of to handle the initialization result.
Upon successful initialization, will be called. If it fails, will be called with an appropriate .
The call must be executed before onCreate()
returns. Therefore, you must call it synchronously on the main thread. If you plan to add a remote flag to control the initialization (e.g. Firebase Remote Config), make sure the check is synchronous (e.g. using a cached flag).
See to understand more about why this is important. An demonstrating this can be found on our .
To learn more about initialization, see the section.