Package com.esri.arcgisruntime
Class LicenseInfo
- java.lang.Object
 - 
- com.esri.arcgisruntime.LicenseInfo
 
 
- 
- All Implemented Interfaces:
 JsonSerializable
public final class LicenseInfo extends java.lang.Object implements JsonSerializable
Contains information for licensing an app from a portal instance. To license an application from a portal, you need a LicenseInfo instance. This can be obtained by callingPortal.fetchLicenseInfoAsync(). The LicenseInfo can then be used to authorize the ArcGIS Runtime app by callingArcGISRuntimeEnvironment.setLicense(LicenseInfo). Note thatLicenseInfois only available when a user is logged in to the portal.The use of some members in the ArcGIS Runtime API requires a specific license level. Please refer to Licensing details by class.
- Since:
 - 100.0.0
 - See Also:
 ArcGISRuntimeEnvironment.setLicense(LicenseInfo),Portal.fetchLicenseInfoAsync()
 
- 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LicenseInfofromJson(java.lang.String json)Creates a LicenseInfo instance from a JSON string.java.util.Map<java.lang.String,java.lang.Object>getUnknownJson()LicenseInfos never have any unknown JSON so this returns an empty Map.java.util.Map<java.lang.String,java.lang.Object>getUnsupportedJson()LicenseInfos never have any unsupported JSON so this returns an empty Map.java.lang.StringtoJson()Returns the LicenseInfo as a JSON string representation. 
 - 
 
- 
- 
Method Detail
- 
fromJson
public static LicenseInfo fromJson(java.lang.String json)
Creates a LicenseInfo instance from a JSON string.- Parameters:
 json- a JSON string that represents a LicenseInfo- Returns:
 - a LicenseInfo instance
 - Throws:
 java.lang.IllegalArgumentException- if json is null or empty- Since:
 - 100.0.0
 - See Also:
 toJson()
 
- 
toJson
public final java.lang.String toJson()
Returns the LicenseInfo as a JSON string representation. This JSON string can be persisted to disk and reapplied to the app by calling fromJson, which returns a new instance of LicenseInfo to be passed toArcGISRuntimeEnvironment.setLicense(LicenseInfo). The LicenseInfo is valid for 30 days before it expires and requires the user to log in to the portal to acquire a new LicenseInfo object. This approach is particularly useful for licensing an app when there is no network connection available.- Specified by:
 toJsonin interfaceJsonSerializable- Returns:
 - a license string in JSON format
 - Since:
 - 100.0.0
 - See Also:
 fromJson(String)
 
- 
getUnknownJson
public java.util.Map<java.lang.String,java.lang.Object> getUnknownJson()
LicenseInfos never have any unknown JSON so this returns an empty Map.- Specified by:
 getUnknownJsonin interfaceJsonSerializable- Returns:
 - an empty unmodifiable Map
 - Since:
 - 100.0.0
 
 
- 
getUnsupportedJson
public java.util.Map<java.lang.String,java.lang.Object> getUnsupportedJson()
LicenseInfos never have any unsupported JSON so this returns an empty Map.- Specified by:
 getUnsupportedJsonin interfaceJsonSerializable- Returns:
 - an empty unmodifiable Map
 - Since:
 - 100.0.0
 
 
 - 
 
 -