Class ArcGISRuntimeEnvironment


  • public final class ArcGISRuntimeEnvironment
    extends Object
    Provides static methods for licensing your app for deployment.

    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
    • Constructor Detail

      • ArcGISRuntimeEnvironment

        public ArcGISRuntimeEnvironment()
    • Method Detail

      • getAPIVersion

        public static String getAPIVersion()
        Indicates the current version of the ArcGIS Runtime SDK for Android.
        Returns:
        the API version.
        Since:
        100.0.0
      • setLicense

        public static LicenseResult setLicense​(String licenseKey)
        Licenses the application using the given license key, and returns a LicenseResult indicating the outcome of the license operation. License key strings can be used to license an app at any LicenseLevel, whereas LicenseInfo from a named PortalUser can only be used to license an app at the LITE or BASIC LicenseLevels. This method returns a LicenseResult which contains a license status of either Invalid, Expired, or Valid. This will remove the watermark present at LicenseLevel.DEVELOPER and must be called in a deployed application.

        Note: If any LITE, BASIC, STANDARD or ADVANCED licensed functionality is accessed before setting the license, an exception will be thrown.

        Parameters:
        licenseKey - application license key
        Returns:
        LicenseResult the license result
        Since:
        100.0.0
        See Also:
        setLicense(LicenseInfo), setLicense(String, List)
      • setLicense

        public static LicenseResult setLicense​(String licenseKey,
                                               List<String> extensions)
        Licenses the application using the given license key and list of extensions, and returns a LicenseResult indicating the outcome of the license operation. This method returns a LicenseResult which contains a LicenseStatus of either LicenseStatus.Invalid, LicenseStatus.Expired, or LicenseStatus.Valid for the Runtime license. The returned LicenseResult includes a java.util.Map containing a LicenseStatus for each requested extension.
        Parameters:
        licenseKey - application license key
        extensions - a list of extension licenseKey strings, can be null
        Returns:
        the license result
        Throws:
        IllegalArgumentException - if extensions is null
        Since:
        100.0.0
        See Also:
        setLicense(String), setLicense(LicenseInfo)