AI-generated Key Takeaways
-
Config.CloudAnchorMode describes the desired behavior of the ARCore Cloud Anchor API, which uses feature maps to persist anchors across sessions and devices.
-
The default value for Config.CloudAnchorMode is DISABLED.
-
You can set the Cloud Anchor API mode using Config.setCloudAnchorMode(Config.CloudAnchorMode) and configure the session with Session.configure(Config).
-
When Config.CloudAnchorMode is DISABLED, attempts to host or resolve Cloud Anchors will result in a CloudAnchorsNotConfiguredException.
-
When Config.CloudAnchorMode is ENABLED, you can host and resolve Cloud Anchors, but this requires the ACCESS_INTERNET permission and proper API authorization.
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_INTERNETpermission 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.