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()
Attempts to activate the product using provided ActivationIdentity. Returns the License object that has been activated.
Java
|
// keybasedActivationLicense keyBased =ActivationLicense.fromKey("license-key");License activated = licenseManager.activateLicense(keyBased);// OR username/pass based - Note that this is the only API which requires the password.// LicenseSpring will never store user passwords via the SDK.ActivationLicense userBased =ActivationLicense.fromUsername("username","password");License activated =licenseManager.ActivateLicense(userBased);
deactivateLicense(LicenseIdentity identity)
License is deactivated using a method on the Manager. You need to supply the current license identity.
Returns the latest valid installation file, if installation files are defined in the LicenseSpring platform. For more details please see Product Versioning
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.
Tracks device based variables for end uses. Can use the Variable builder as a utility.
Java
|
// build your own Map
licenseManager.trackVariables(LicenseIdentity.fromKey("sample-key"),newHashMap<>);// use utility class to add some variables and track themDeviceVariables deviceVars =DeviceVariables.builder().variable("one","some value").variable("another_var","other_value").build();
licenseManager.trackVariables(LicenseIdentity.fromKey("sample-key"), deviceVars.getVariables());