public static final enum
Config.CloudAnchorMode
Describes the desired behavior of the ARCore Cloud Anchor API. The Cloud Anchor API uses feature maps to persist an anchor throughout sessions and across devices. See the Cloud Anchors developer guide for more information.
The default value is DISABLED
. Use Config.setCloudAnchorMode(Config.CloudAnchorMode)
to set the Cloud Anchor API mode and Session.configure(Config)
to
configure the session.
Inherited Methods
Enum Values
public static final Config.CloudAnchorMode DISABLED
DISABLED
public static final Config.CloudAnchorMode DISABLED
The Cloud Anchor API is disabled. Calling Session.hostCloudAnchorAsync(Anchor, int, BiConsumer
and Session.resolveCloudAnchorAsync(String, BiConsumer
will throw CloudAnchorsNotConfiguredException
.
This is the default mode.
public static final Config.CloudAnchorMode ENABLED
ENABLED
public static final Config.CloudAnchorMode ENABLED
The Cloud Anchor API is enabled. Session.hostCloudAnchorAsync(Anchor, int, BiConsumer
and Session.resolveCloudAnchorAsync(String, BiConsumer
can be used to host and resolve Cloud Anchors.
Using this mode requires your app to do the following:
- Include the
ACCESS_INTERNET
permission to the app's AndroidManifest; otherwise,Session.configure(Config)
throwsSecurityException
. - Configure Keyless or API Key authorization.
Use Config.setCloudAnchorMode(Config.CloudAnchorMode)
to set the Cloud Anchor API mode and Session.configure(Config)
to configure the session.