SDKs
Android SDK

LicenseManager

12min

After completing SDK Initialization, there are a number of methods and objects available to the app developer.

getCurrent()

In case no active license is available the property value will be null.

Java


getTrialLicense(String email)

You can generate a trial key directly from the app using the SDK, which will automatically associate this license key with the provided email. You can later use this data from the LicenseSpring platform to send out email campaigns targeting trial users for example.

After you generate a trial key - the UnactivatedTrialLicense object will be returned, you still need to activate it using a call to licenseManager.activateLicense()

Java


activateLicenseKey(ActivationLicense identity)

Attempts to activate the product using provided ActivationIdentity. Returns the License object that has been activated.

Java


deactivateLicense(LicenseIdentity identity)

License is deactivated using a method on the Manager. You need to supply the current license identity.

Java


getInstallationFile(LicenseIdentity identity)

Returns the latest valid installation file, if installation files are defined in the LicenseSpring platform. For more details please see Product Versioning

Java


getVersions(LicenseIdentity identity)

Returns all available versions of the product app that are specified in LicenseSpring platform. For more details please see Product Versioning. Version class only contains String version.

trackVariables(LicenseIdentity identity, Map<String, String> variables)

Tracks device based variables for end uses. Can use the Variable builder as a utility.

Java


getProduct()

Gets product details from LicenseSpring servers.

Java


getAirGapActivationCode

Gets the activation code use for air gapped license

Needs the LicenseSpringConfiguration field: airGappedPublicKey to work with Air Gap Licenses

Java


activateAirGapResponse

Activates the air gapped license from the license policy file

Needs the LicenseSpringConfiguration field: airGappedPublicKey to work with Air Gap Licenses

Java


verifyAirGapConfirmationCode

Verifies the confirmation code for air gapped license

Needs the LicenseSpringConfiguration field: airGappedPublicKey to work with Air Gap Licences

Java