ARCore is back at Google I/O on May 10! Register now.

Anchor.TerrainAnchorState

Stay organized with collections Save and categorize content based on your preferences.
public static final enum Anchor.TerrainAnchorState

Describes the current Terrain anchor state of an Anchor. Obtained by Anchor.getTerrainAnchorState().

Public Methods

static Anchor.TerrainAnchorState
forNumber(int nativeCode)
boolean
static Anchor.TerrainAnchorState
valueOf(String name)
final static TerrainAnchorState[]
values()

Inherited Methods

Enum Values

ERROR_INTERNAL

public static final Anchor.TerrainAnchorState ERROR_INTERNAL

Resolving task for this Terrain anchor finished with an internal error. The app should not attempt to recover from this error.

ERROR_NOT_AUTHORIZED

public static final Anchor.TerrainAnchorState ERROR_NOT_AUTHORIZED

The authorization provided by the application is not valid. The Google Cloud project may not have enabled the ARCore API. When using API key authentication, this will happen if the API key in the manifest is invalid or unauthorized. It may also fail if the API key is restricted to a set of apps not including the current one. When using keyless authentication, this may happen when no OAuth client has been created, or when the signing key and package name combination does not match the values used in the Google Cloud project. It may also fail if Google Play Services isn't installed, is too old, or is malfunctioning for some reason (e.g. killed due to memory pressure).

ERROR_UNSUPPORTED_LOCATION

public static final Anchor.TerrainAnchorState ERROR_UNSUPPORTED_LOCATION

There is no terrain information at this location, such as the center of the ocean.

NONE

public static final Anchor.TerrainAnchorState NONE

This Anchor is not a Terrain anchor, or the Terrain anchor has become invalid due to Earth having TrackingState.STOPPED due to Config.GeospatialMode.DISABLED being set on the Session. All Terrain anchors transition to NONE when Config.GeospatialMode.DISABLED becomes active on the Session.

SUCCESS

public static final Anchor.TerrainAnchorState SUCCESS

A resolving task for this Terrain anchor has finished successfully.

TASK_IN_PROGRESS

public static final Anchor.TerrainAnchorState TASK_IN_PROGRESS

Resolving the Terrain anchor is in progress. Once the task completes in the background, the anchor will get a new Terrain anchor state after the next Session.update() call.

Public Methods

forNumber

public static Anchor.TerrainAnchorState forNumber(
  int nativeCode
)

Details
Parameters
nativeCode

isError

public boolean isError()

valueOf

public static Anchor.TerrainAnchorState valueOf(
  String name
)

Details
Parameters
name

values

public static final TerrainAnchorState[] values()