Interface ApiKeyResource
-
- All Known Implementing Classes:
ArcGISSceneLayer
,ArcGISTiledLayer
,ArcGISVectorTiledLayer
,Basemap
,ClosestFacilityTask
,ExportTileCacheTask
,ExportVectorTilesTask
,GeodatabaseSyncTask
,LocatorTask
,RouteTask
,ServiceAreaTask
,ServiceFeatureTable
public interface ApiKeyResource
An interface for getting and setting the API key of an object.This interface will be used for getting and setting the API key generated from ArcGIS Developers website on objects where required.
- Since:
- 100.10.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getApiKey()
Gets the API key to access API key enabled services and resources in ArcGIS Online.void
setApiKey(String apiKey)
Sets the API key to access API key enabled services and resources in ArcGIS Online.
-
-
-
Method Detail
-
getApiKey
String getApiKey()
Gets the API key to access API key enabled services and resources in ArcGIS Online.An API key is a unique key used to authorize access to specific services and resources in ArcGIS Online. It is also used to monitor access to those services. An API key is created and managed in the ArcGIS developer dashboard and is tied to a specific ArcGIS account.
In addition to setting an API key at a global level for your application using
ArcGISRuntimeEnvironment.setApiKey(String)
, you can callsetApiKey(String)
on any ArcGIS Runtime class that implementsApiKeyResource
. When you callsetApiKey(String)
on anAPIKeyResource
, it will override the default key at the global level (the key returned byArcGISRuntimeEnvironment.getApiKey()
, in other words), enabling more granular usage telemetry and management for ArcGIS Online resources used by your app.Classes that expose an API key property by implementing APIKeyResource include:
- Returns:
- the API key to access API key enabled services and resources in ArcGIS Online
- Since:
- 100.10.0
- See Also:
setApiKey(String)
-
setApiKey
void setApiKey(String apiKey)
Sets the API key to access API key enabled services and resources in ArcGIS Online.An API key is a unique key used to authorize access to specific services and resources in ArcGIS Online. It is also used to monitor access to those services. An API key is created and managed in the ArcGIS developer dashboard and is tied to a specific ArcGIS account.
In addition to setting an API key at a global level for your application using
ArcGISRuntimeEnvironment.setApiKey(String)
, you can callsetApiKey(String)
on any ArcGIS Runtime class that implementsApiKeyResource
. When you callsetApiKey(String)
on anAPIKeyResource
, it will override the default key at the global level (the key returned byArcGISRuntimeEnvironment.getApiKey()
, in other words), enabling more granular usage telemetry and management for ArcGIS Online resources used by your app.Classes that expose an API key property by implementing APIKeyResource include:
- Parameters:
apiKey
- the API key to access API key enabled services and resources in ArcGIS Online- Since:
- 100.10.0
- See Also:
getApiKey()
-
-