Cloud Anchors

The cloud state and configuration of an Anchor and the AR Session.

Summary

Enumerations

ArCloudAnchorMode{
  AR_CLOUD_ANCHOR_MODE_DISABLED = 0,
  AR_CLOUD_ANCHOR_MODE_ENABLED = 1
}
enum
Indicates the cloud configuration of the ArSession.
ArCloudAnchorState{
  AR_CLOUD_ANCHOR_STATE_NONE = 0,
  AR_CLOUD_ANCHOR_STATE_TASK_IN_PROGRESS = 1,
  AR_CLOUD_ANCHOR_STATE_SUCCESS = 2,
  AR_CLOUD_ANCHOR_STATE_ERROR_INTERNAL = -1,
  AR_CLOUD_ANCHOR_STATE_ERROR_NOT_AUTHORIZED = -2,
  AR_CLOUD_ANCHOR_STATE_ERROR_RESOURCE_EXHAUSTED = -4,
  AR_CLOUD_ANCHOR_STATE_ERROR_HOSTING_DATASET_PROCESSING_FAILED = -5,
  AR_CLOUD_ANCHOR_STATE_ERROR_CLOUD_ID_NOT_FOUND = -6,
  AR_CLOUD_ANCHOR_STATE_ERROR_RESOLVING_SDK_VERSION_TOO_OLD = -8,
  AR_CLOUD_ANCHOR_STATE_ERROR_RESOLVING_SDK_VERSION_TOO_NEW = -9,
  AR_CLOUD_ANCHOR_STATE_ERROR_HOSTING_SERVICE_UNAVAILABLE = -10
}
enum
Describes the current cloud state of an Anchor.

Enumerations

ArCloudAnchorMode

 ArCloudAnchorMode

Indicates the cloud configuration of the ArSession.

Properties
AR_CLOUD_ANCHOR_MODE_DISABLED

Anchor Hosting is disabled.

This is the value set in the default ArConfig.

AR_CLOUD_ANCHOR_MODE_ENABLED

Anchor Hosting is enabled.

Setting this value and calling ArSession_configure() will require that the application have the Android INTERNET permission.

ArCloudAnchorState

 ArCloudAnchorState

Describes the current cloud state of an Anchor.

Properties
AR_CLOUD_ANCHOR_STATE_ERROR_CLOUD_ID_NOT_FOUND

Resolving failed, because the ARCore Cloud Anchor service could not find the provided Cloud Anchor ID.

AR_CLOUD_ANCHOR_STATE_ERROR_HOSTING_DATASET_PROCESSING_FAILED

Hosting failed, because the server could not successfully process the dataset for the given anchor.

The developer should try again after the device has gathered more data from the environment.

AR_CLOUD_ANCHOR_STATE_ERROR_HOSTING_SERVICE_UNAVAILABLE

The ARCore Cloud Anchor Service was unreachable.

This can happen for a number of reasons. The device might be in airplane mode or does not have a working internet connection. The request sent to the server might have timed out with no response, or there might be a bad network connection, DNS unavailability, firewall issues, or anything else that might affect the device's ability to connect to the ARCore Cloud Anchor service.

AR_CLOUD_ANCHOR_STATE_ERROR_INTERNAL

A hosting/resolving task for this anchor finished with an internal error.

The app should not attempt to recover from this error.

AR_CLOUD_ANCHOR_STATE_ERROR_NOT_AUTHORIZED

The app cannot communicate with the ARCore Cloud Anchor service because of an invalid or unauthorized API key in the manifest, or because there was no API key present in the manifest.

AR_CLOUD_ANCHOR_STATE_ERROR_RESOLVING_SDK_VERSION_TOO_NEW

The anchor could not be acquired because the SDK used to host the anchor was older than and incompatible with the version being used to acquire it.

AR_CLOUD_ANCHOR_STATE_ERROR_RESOLVING_SDK_VERSION_TOO_OLD

The anchor could not be resolved because the SDK used to host the anchor was newer than and incompatible with the version being used to acquire it.

AR_CLOUD_ANCHOR_STATE_ERROR_RESOURCE_EXHAUSTED

The application has exhausted the request quota allotted to the given API key.

The developer should request additional quota for the ARCore Cloud Anchor service for their API key from the Google Developers Console.

AR_CLOUD_ANCHOR_STATE_NONE

The anchor is purely local.

It has never been hosted using hostCloudAnchor, and has not been acquired using acquireCloudAnchor.

AR_CLOUD_ANCHOR_STATE_SUCCESS

A hosting/resolving task for this anchor completed successfully.

AR_CLOUD_ANCHOR_STATE_TASK_IN_PROGRESS

A hosting/resolving task for the anchor is in progress.

Once the task completes in the background, the anchor will get a new cloud state after the next update() call.