Documentation

Support

Vivox Core SDK

Vivox Core SDK

Initialize Vivox Android services

How to initialize the Vivox Android services.
Read time 1 minuteLast updated 20 hours ago

To address Android platform requirements, you must initialize the Vivox Android services that are included in the Vivox Java library by invoking the
com.vivox.sdk.JniHelpers.init(...)
static method. Failing to do so will report
SDK_UNINITIALIZED
even though the underlying native Vivox SDK library is initialized.
  • A call to
    JniHelpers.init(getApplicationContext(), null, new String[]{"app-so-lib-name"});
    loads the Vivox Android library, the native Vivox library, and the application's
    libapp-so-lib-name.so
    library.
  • A call to
    JniHelpers.init(getApplicationContext());
    only loads the Vivox Android library and the native Vivox library. It is then the application developer's responsibility to separately load the application's
    libapp-so-lib-name.so
    library.
There are six variants of
com.vivox.sdk.JniHelpers.init(...)
. The Android app context is the only non-optional argument:
public static boolean init(Context appContext);public static boolean init(Context appContext, String certFile);public static boolean init(Context appContext, String certFile, String[] libs);public static boolean init(String vivoxLibraryPath, Context appContext);public static boolean init(String vivoxLibraryPath, Context appContext, String certFile);public static boolean init(String vivoxLibraryPath, Context appContext, String certFile, String[] libs);
For an example, see
SDKSampleApp/Source/src/main/java/com/vivox/sampleapp/MainActivity.java