Library loading and initialization
Before using the features of EasyAR Sense, initialization is required. During initialization, EasyAR Sense will set up necessary environments and validate the License Key.
Non-android platforms
For iOS/macOS/visionOS/Windows platforms, library loading is generally achieved through dynamic linking during compilation. Refer to the examples to add references to the EasyAR library and include the EasyAR library header files when needed.
Initialization only requires calling initialize and passing in the license key.
Android platform
For the Android platform, library loading is generally done through java.lang.System.loadLibrary.
Initialization only requires calling initialize and passing in the current Activity and License Key, which will automatically call java.lang.System.loadLibrary.
If you need to place libEasyAR.so in a non-default location (e.g., dynamically downloading it during runtime), you should instead call initialize and pass in the current Activity, License Key, and the path where libEasyAR.so is stored.
If you have more complex requirements, you can separate the steps of loading libEasyAR.so, setting the Activity, and validating the License Key. You can first call loadLibraries, then call setupActivity, and finally call initializeKey.