Library loading and initialization
Before using EasyAR Sense features, initialization is required. During initialization, EasyAR Sense sets up the necessary environment and verifies the License Key.
Non-Android platforms
For iOS/macOS/visionOS/Windows platforms, library loading is generally implemented through dynamic linking at compile time. Add references to the EasyAR libraries according to the samples, and add EasyAR library header files when needed.
Initialization only requires calling initialize and passing in the license key.
Android platform
For the Android platform, dynamic libraries are generally loaded through java.lang.System.loadLibrary.
Initialization only requires calling initialize and passing in the current Activity and License Key. java.lang.System.loadLibrary will be called automatically.
If you need to place libEasyAR.so in a non-default location, for example dynamically downloading it during runtime, you need to call initialize instead and pass in the current Activity, License Key, and the storage path of libEasyAR.so.
If you have more complex requirements, you can split loading libEasyAR.so, setting Activity, and verifying License Key into three separate steps. You can first call loadLibraries, then call setupActivity, and then call initializeKey.