load Function
@JvmStatic fun load(application: Application): Boolean
Loads the SDK using a licence key shipped in your application’s assets.
The key is read from assets/pixelnetica/scanning/, trying these file names in order and using the first that exists: your application id with a .key suffix (com.example.app.key), your application id alone, licence.key, license.key, licence, license, key.
A missing or empty key is not an error: the SDK loads unlicensed and watermarks its output. The return value tells you which happened.
Return
true if a key file was found and read. The key is not validated here — use isLicenceValid for that.
Parameters
- application — your android.app.Application; call this from its
onCreate
@JvmStatic fun load(application: Application, licenseKey: String)
Loads the SDK using a licence key you supply directly.
Use this when the key arrives from somewhere other than your assets — a server, encrypted storage, or a build-time constant. An empty key loads the SDK unlicensed, which watermarks its output rather than failing.
Parameters
- application — your android.app.Application; call this from its
onCreate - licenseKey — the licence key issued for your application id
@JvmStatic fun load(application: Application, @StringRes resId: Int)
Loads the SDK using a licence key held in a string resource.
Parameters
- application — your android.app.Application; call this from its
onCreate - resId — a string resource containing the licence key