Runtime license information. More...
This class was introduced in Esri::ArcGISRuntime 100.0.
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 is set by calling ArcGISRuntimeEnvironment::setLicense(const QString&) with a license string 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 string acquired from the ArcGIS for Developers website or Esri Customer Service.
To license with a license string, call ArcGISRuntimeEnvironment::setLicense(const QString&).
To validate with information from a portal, you need a LicenseInfo instance. Obtain one by calling PortalInfo::licenseInfo(). Pass the LicenseInfo to ArcGISRuntimeEnvironment::setLicense(const 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(const LicenseInfo&) returns a LicenseResult which contains license status of LicenseStatus::LoginRequired, and the app continues to run at the current license level (LicenseLevel::Developer by default).
Member Function Documentation
Time License: : expiry() const
Returns the license expiry date and time in UTC.
This method gets either the expiry date of a license set with ArcGISRuntimeEnvironment::setLicense(const QString&) or the portal subscription expiry when using ArcGISRuntimeEnvironment::setLicense(const LicenseInfo&).
:> License: A r c GISRuntime: : Extension License : extensions() const
Returns a list of extension licenses that were applied to the app.
For valid extension license keys supplied when calling ArcGISRuntimeEnvironment::setLicense(const QString&, const QStringList&), 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 whether a license is perpetual or not.
Typically this returns
true for a license string with 'none' for the expiration date field.
: License: A r c GISRuntime: : License Level : license Level() const
Returns the current license level set in the app. The current license level may be Developer, Lite, Basic, Standard, or Advanced.
By default, when an app is launched it runs at the Developer level until a deployment license has been provided.
: License: A r c GISRuntime: : License Status : license Status() const
Returns the license status for the current license applied to the app.
Usually this status returns Valid because the current License object always contains the most current valid license.
: License: A r c GISRuntime: : License Type : license Type() const
Returns the current license type for the license applied to the app.
In developer mode, this function returns Developer. Otherwise, it can return NamedUser if the app was licensed by logging in to a portal and acquiring LicenseInfo, or LicenseKey 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 (LicenseKey) and later become licensed from LicenseInfo (NamedUser).