Common Definitions

Shared types and constants.

Summary

Enumerations

ArStatus{
  AR_SUCCESS = 0,
  AR_ERROR_INVALID_ARGUMENT = -1,
  AR_ERROR_FATAL = -2,
  AR_ERROR_SESSION_PAUSED = -3,
  AR_ERROR_SESSION_NOT_PAUSED = -4,
  AR_ERROR_NOT_TRACKING = -5,
  AR_ERROR_TEXTURE_NOT_SET = -6,
  AR_ERROR_MISSING_GL_CONTEXT = -7,
  AR_ERROR_UNSUPPORTED_CONFIGURATION = -8,
  AR_ERROR_CAMERA_PERMISSION_NOT_GRANTED = -9,
  AR_ERROR_DEADLINE_EXCEEDED = -10,
  AR_ERROR_RESOURCE_EXHAUSTED = -11,
  AR_ERROR_NOT_YET_AVAILABLE = -12,
  AR_ERROR_CAMERA_NOT_AVAILABLE = -13,
  AR_UNAVAILABLE_ARCORE_NOT_INSTALLED = -100,
  AR_UNAVAILABLE_DEVICE_NOT_COMPATIBLE = -101,
  AR_UNAVAILABLE_APK_TOO_OLD = -103,
  AR_UNAVAILABLE_SDK_TOO_OLD = -104,
  AR_UNAVAILABLE_USER_DECLINED_INSTALLATION = -105
}
enum
Return code indicating success or failure of a method.
ArTrackingState{
  AR_TRACKING_STATE_TRACKING = 0,
  AR_TRACKING_STATE_PAUSED = 1,
  AR_TRACKING_STATE_STOPPED = 2
}
enum
Describes the tracking state of a Trackable, an ArAnchor or the ArCamera.

Enumerations

ArStatus

 ArStatus

Return code indicating success or failure of a method.

Properties
AR_ERROR_CAMERA_NOT_AVAILABLE

The android camera has been reallocated to a higher priority app or is otherwise unavailable.

AR_ERROR_CAMERA_PERMISSION_NOT_GRANTED

The android camera permission has not been granted prior to calling ArSession_resume()

AR_ERROR_DEADLINE_EXCEEDED

Acquire failed because the object being acquired is already released.

For example, this happens if the application holds an ArFrame beyond the next call to ArSession_update(), and then tries to acquire its point cloud.

AR_ERROR_FATAL

An internal error occurred that the application should not attempt to recover from.

AR_ERROR_INVALID_ARGUMENT

One of the arguments was invalid, either null or not appropriate for the operation requested.

AR_ERROR_MISSING_GL_CONTEXT

An operation required GL context but one was not available.

AR_ERROR_NOT_TRACKING

An operation was attempted that the session be in the TRACKING state, but the session was not.

AR_ERROR_NOT_YET_AVAILABLE

Acquire failed because the data isn't available yet for the current frame.

For example, acquire the image metadata may fail with this error because the camera hasn't fully started.

AR_ERROR_RESOURCE_EXHAUSTED

There are no available resources to complete the operation.

In cases of acquire methods returning this error, This can be avoided by releasing previously acquired objects before acquiring new ones.

AR_ERROR_SESSION_NOT_PAUSED

An operation was attempted that requires the session be paused, but the session was running.

AR_ERROR_SESSION_PAUSED

An operation was attempted that requires the session be running, but the session was paused.

AR_ERROR_TEXTURE_NOT_SET

A texture name was not set by calling ArSession_setCameraTextureName() before the first call to ArSession_update()

AR_ERROR_UNSUPPORTED_CONFIGURATION

The configuration supplied to ArSession_configure() was unsupported.

To avoid this error, ensure that Session_checkSupported() returns true.

AR_SUCCESS

The operation was successful.

AR_UNAVAILABLE_APK_TOO_OLD

The ARCore APK currently installed on device is too old and needs to be updated.

AR_UNAVAILABLE_ARCORE_NOT_INSTALLED

The ARCore APK is not installed on this device.

AR_UNAVAILABLE_DEVICE_NOT_COMPATIBLE

The device is not currently compatible with ARCore.

AR_UNAVAILABLE_SDK_TOO_OLD

The ARCore APK currently installed no longer supports the ARCore SDK that the application was built with.

AR_UNAVAILABLE_USER_DECLINED_INSTALLATION

The user declined installation of the ARCore APK during this run of the application and the current request was not marked as user-initiated.

ArTrackingState

 ArTrackingState

Describes the tracking state of a Trackable, an ArAnchor or the ArCamera.

Properties
AR_TRACKING_STATE_PAUSED

ARCore has paused tracking this object, but may resume tracking it in the future.

This can happen if device tracking is lost, if the user enters a new space, or if the Session is currently paused. When in this state, the positional properties of the object may be wildly inaccurate and should not be used.

AR_TRACKING_STATE_STOPPED

ARCore has stopped tracking this Trackable and will never resume tracking it.

AR_TRACKING_STATE_TRACKING

The object is currently tracked and its pose is current.

Send feedback about...