Runtime license information. More...
|Import Statement:||import Esri.ArcGISRuntime 100.7|
- expiry : time
- extensions : list<ExtensionLicense>
- licenseLevel : Enums.LicenseLevel
- licenseStatus : Enums.LicenseStatus
- licenseType : Enums.LicenseType
- permanent : bool
Note: You cannot declare or create a component of this type in QML code.
Until an app is licensed, it runs at the Developer license level. All functionality is available, but the map display is watermarked and the API logs messages stating that the app is in developer mode.
A deployed app needs to be run at minimum with the Lite license level to disable the map watermark. The Lite, Basic, Standard, or Advanced license level can be set by a license key obtained from the ArcGIS for Developers website or Esri Customer Service. With the varying license levels, a subset of functionality is available. Any attempt to use licensed functionality that is not available at the current license level, licenseLevel, will log or emit error messages.
To get Lite, Basic, Standard, or Advanced license level functionality, a user app is licensed in one of two ways:
- With license information retrieved after logging in to a portal (Lite and Basic levels).
- With a license key acquired from the ArcGIS for Developers website or Esri Customer Service.
Check the "License your app" guide topic to learn how to license your app with a license key.
To validate with information from a portal, you need a LicenseInfo instance. Obtain one by calling PortalInfo.licenseInfo. Pass the LicenseInfo to ArcGISRuntimeEnvironment.setLicense(LicenseInfo). Both of these methods return a LicenseResult indicating the result from applying the license. Note that there is a 30-day timeout when using LicenseInfo: if the app is licensed using this method, the user must log in to the portal again before licensing the app. When this period has expired, calling ArcGISRuntimeEnvironment.setLicense(LicenseInfo) returns a LicenseResult which contains license status of Enums.LicenseStatusLoginRequired, and the app continues to run at the current license level (Enums.LicenseLevelDeveloper by default).
extensions : list<ExtensionLicense>
Returns a list of extension licenses that were applied to the app (read-only).
For valid extension license keys supplied, this list is populated with information about the extension license. Use this function to iterate through extension licenses that are available in the app environment.
All extension licensed functionality is available when the app is running in developer mode. This list will return empty if this is the case, but you will be able to access all functionality while the view displays a watermark.
See also ExtensionLicense.
Returns the current license level set in the app (read-only).
The current license level: Developer, Basic, or Standard.
See also Enums.LicenseLevel.
Returns the license status for the current license applied to the app (read-only).
Usually this status returns Valid because the current License object always contains the most current valid license.
The current license status: Invalid, Expired, LoginRequired, or Valid.
See also Enums.LicenseStatus.
Returns the current license type for the license applied to the app (read-only).
In developer mode, this property returns Enums.LicenseTypeDeveloper. Otherwise, it can return Enums.LicenseTypeNamedUser if the app was licensed by logging in to a portal and acquiring LicenseInfo, or Enums.LicenseTypeLicenseKey if the app was licensed from a license key string. The license type can change while an app runs. For instance, the app may start running licensed with a Lite license key (Enums.LicenseTypeLicenseKey) and later become licensed from LicenseInfo (Enums.LicenseTypeNamedUser).
The current license type: Developer, NamedUser, or LicenseKey.
See also Enums.LicenseType.
true if the license expiry is perpetual (read-only).
This is common amongst license keys.