website logo
⌘K
Getting Started
Introduction
Basic Concepts
Opening an Account
Creating & Configuring Products
Integrating SDK and Configuring License Fulfillment
Activate a Key-Based License
Vendor Platform
Issuing New Licenses
License Detail View
Order Detail View
Customer Detail View
Metadata
Analytics
Settings
Product Configuration
Product Features
Product Custom Fields
Product Versioning
License Policies
Product Bundles
License Entitlements
License Types
Activations & Device Transfers
Features
Custom Fields
License Start Date
License Note
Maintenance Period
Trial Licenses
Floating Licenses
License Activation Types
Portals
End-User Portal
Offline Portal
Air-Gapped Portal
License API
License API Authorization
License Activation/Deactivation
License Check
Consumption
Floating
Trial Key
Product Details
Device Variables
Changing Password
Management API
Making API Requests
Management API Authorization
Customer
Product
Order
License
Device
Analytics
SDKs
Tutorials
.NET/C# SDK
.NET/C# Management SDK
C++ SDK
Java SDK
Python SDK
Go SDK
Delphi SDK
Swift/Objective-C SDK
Android SDK
Unity SDK
Errors and Response Codes
Floating Server
API Reference
Deployment
Configuration
Floating Server UI
Securing the Server
Whitelabeling
FAQ
Floating Server Changelog
Integrations
Salesforce
FastSpring
Stripe
Shopify
Common Scenarios
Single Sign On (SSO)
Glossary
General
SDK Glossary
Vendor Platform
Product Configuration Glossary
License Configuration
Postman Collections
Frequently Asked Questions
Changelog
License API changelog
Platform changelog
Docs powered by
Archbee
SDKs
Android SDK

License & License Data Objects

1min

The License file contains all information about the license. License Data class contains elements which are returned from LicenseSpring servers, it's signature is checked against the public key of LicenseSpring servers.

JS
|
public class License {
    private final LicenseData data;
    private final LicenseIdentity identity;

    private final InstallationFile installationFile;
    private final Product product;

	private final String hardwareId;
    private ZonedDateTime lastCheck;
    private ZonedDateTime lastUsage;
    private int localConsumptions;

    private transient LicenseRepository repository;
    private transient LicenseService service;

    private Boolean remoteExpired;
    private Boolean active;
    private Boolean enabled;

 
  	public static License createFromCheck(License license, CheckResponse checkResponse);
  
 	public int getMaxActivations();

  	public int getMaxConsumptions();

  	public int getTotalConsumptions();
 
  	public int getTimesActivated();
 
  	public void increaseConsumption();

	public void increaseConsumption(int increment);

    public void syncConsumptions(Context context);

    public void increaseFeatureConsumption(String feature, Context context);

    public void increaseFeatureConsumption(String feature, int increment, Context context);

    public boolean isExpired();

    public long daysRemaining();

    public long daysPassedSinceLastCheck();

    public void localCheck(Context context);

    public Product getProduct();
}


The License object can be used to check the validity of the license, add consumptions for consumption type of License. The License object is stored on disk encrypted.

Updated 05 Sep 2023
Did this page help you?
PREVIOUS
LicenseManager
NEXT
Java Exception Handling
Docs powered by
Archbee
Docs powered by
Archbee