Initialization will normally succeed unless an unexpected error or exception is encountered. In case of failure, you can check the reason via the returned result.
if(result.isSuccessful) {NSLog(@"Initialization succeeded");}else {NSLog(@"Initialization failed with reason %lu", result.failureReason);}
Android
Add the following code inside the onCreate() method of your Application class:
...importcom.sentiance.sdk.init.InitializationResult;importcom.sentiance.react.bridge.core.SentianceHelper;publicclassMainApplicationextendsApplicationimplementsReactApplication { @OverridepublicvoidonCreate() { super.onCreate();...SentianceHelper sentianceHelper =SentianceHelper.getInstance(this);InitializationResult result =sentianceHelper.initializeSDK(); }...}
Initialization will normally succeed, unless an unexpected error or exception is encountered. In case of failure, you can check the reason via the returned result.
if (result.isSuccessful()) {Log.d(TAG,"Initialization succeeded");} else {Log.e(TAG,"Initialization failed with reason "+result.getFailureReason().getName(),result.getThrowable());}