The SDK behaves as a singleton — initialize it only once and reuse it. As soon as you initialize the SDK, it will contact the LicenseSpring server to check if there is an existing license for the current device / product combination.
If a license is available, it will be immediately accessible as a License object. During initialization the LicenseManager will try to read the license information from the specified license file and validate it with the license server. If successful, LicenseManager.getCurrent() will return a License object with detailed license information.
The LicenseManager takes two arguments for initialization: LicenseSpringConfiguration and the application context. The application context is used to save license files to internal app storage.
The SDK has a hardware key generator based on the Secure Android ID. If the Secure Android ID is null, a UUID will be used as the hardware key.
At minimum, you must provide three parameters to initialize the SDK:
apiKey — your company API key
productCode — a two-letter string identifying the product (application)
sharedKey — company-specific encryption key used when signing requests
All of these values are available in the LicenseSpring web platform under the "SDK integration" section.
1
Build configuration
Create a LicenseSpringConfiguration with the required values (and optional app metadata):