GoogleARCore.CrossPlatform.XPSession

Represents a cross-platform ARCore session.

Summary

Public static functions

CancelCloudAnchorAsyncTask(string cloudAnchorId)
void
Attempts to cancel a pending AsyncTask<CloudAnchorResult> initiated by a call to ResolveCloudAnchor(string).
CreateCloudAnchor(Anchor anchor)
AsyncTask< CloudAnchorResult >
Attempts to asynchronously host a new Cloud Anchor.
ResolveCloudAnchor(string cloudAnchorId)
AsyncTask< CloudAnchorResult >
Attempts to asynchronously resolve a Cloud Anchor.

Public static functions

CancelCloudAnchorAsyncTask

void CancelCloudAnchorAsyncTask(
  string cloudAnchorId
)

Attempts to cancel a pending AsyncTask<CloudAnchorResult> initiated by a call to ResolveCloudAnchor(string).

Any pending AsyncTasks associated with the given cloudAnchorId will complete with result: CloudServiceResponse.ErrorRequestCancelled and the CloudAnchorResult.Anchor will be null. If no operation is pending for the given cloudAnchorId , this call does not take effect and a warning message will be logged.

Details
Parameters
cloudAnchorId
The id of the Cloud Anchor that is being watched or resolved.

CreateCloudAnchor

AsyncTask< CloudAnchorResult > CreateCloudAnchor(
  Anchor anchor
)

Attempts to asynchronously host a new Cloud Anchor.

Details
Parameters
anchor
The anchor to host.
Returns
A task that will complete when the attempt to host a new Cloud Anchor has finished. The result will be a CloudAnchorResult associated with the operation.

ResolveCloudAnchor

AsyncTask< CloudAnchorResult > ResolveCloudAnchor(
  string cloudAnchorId
)

Attempts to asynchronously resolve a Cloud Anchor.

You don’t need to wait for a call to resolve a Cloud Anchor to complete before initiating another call. A session can have up to 20 Cloud Anchors and pending AsyncTasks at a given time. The task will continue to retry in the background indefinitely, until it is successfully resolved, cancelled, or reaches a terminal error state.

Details
Parameters
cloudAnchorId
The id of the Cloud Anchor to resolve.
Returns
A task that will complete when the attempt to resolve a Cloud Anchor has finished. The result will be a CloudAnchorResult associated with the operation.