Flutter Engine
The Flutter Engine
Functions
Common Definitions

Functions

 AR_DEFINE_ENUM (ArStatus)
 
 AR_DEFINE_ENUM (ArTrackingState)
 

Detailed Description

Shared types and constants

Function Documentation

◆ AR_DEFINE_ENUM() [1/2]

AR_DEFINE_ENUM ( ArStatus  )

Return code indicating success or failure of a method.

The operation was successful.

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

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

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

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

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

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

An operation required GL context but one was not available.

The configuration supplied to ArSession_configure() was unsupported. To avoid this error, ensure that Session_checkSupported() returns true.

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

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.

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.

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.

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

The host/resolve function call failed because the Session is not configured for cloud anchors.

ArSession_configure() failed because the specified configuration required the Android INTERNET permission, which the application did not have.

HostCloudAnchor() failed because the anchor is not a type of anchor that is currently supported for hosting.

An image with insufficient quality (e.g. too few features) was attempted to be added to the image database.

The data passed in for this operation was not in a valid format.

The data passed in for this operation is not supported by this version of the SDK.

The ARCore APK is not installed on this device.

The device is not currently compatible with ARCore.

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

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

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

Definition at line 470 of file arcore_c_api.h.

470 {
471 /// The operation was successful.
472 AR_SUCCESS = 0,
473
474 /// One of the arguments was invalid, either null or not appropriate for the
475 /// operation requested.
476 AR_ERROR_INVALID_ARGUMENT = -1,
477
478 /// An internal error occurred that the application should not attempt to
479 /// recover from.
480 AR_ERROR_FATAL = -2,
481
482 /// An operation was attempted that requires the session be running, but the
483 /// session was paused.
484 AR_ERROR_SESSION_PAUSED = -3,
485
486 /// An operation was attempted that requires the session be paused, but the
487 /// session was running.
488 AR_ERROR_SESSION_NOT_PAUSED = -4,
489
490 /// An operation was attempted that the session be in the TRACKING state,
491 /// but the session was not.
492 AR_ERROR_NOT_TRACKING = -5,
493
494 /// A texture name was not set by calling ArSession_setCameraTextureName()
495 /// before the first call to ArSession_update()
496 AR_ERROR_TEXTURE_NOT_SET = -6,
497
498 /// An operation required GL context but one was not available.
499 AR_ERROR_MISSING_GL_CONTEXT = -7,
500
501 /// The configuration supplied to ArSession_configure() was unsupported.
502 /// To avoid this error, ensure that Session_checkSupported() returns true.
503 AR_ERROR_UNSUPPORTED_CONFIGURATION = -8,
504
505 /// The android camera permission has not been granted prior to calling
506 /// ArSession_resume()
507 AR_ERROR_CAMERA_PERMISSION_NOT_GRANTED = -9,
508
509 /// Acquire failed because the object being acquired is already released.
510 /// For example, this happens if the application holds an ::ArFrame beyond
511 /// the next call to ArSession_update(), and then tries to acquire its point
512 /// cloud.
513 AR_ERROR_DEADLINE_EXCEEDED = -10,
514
515 /// There are no available resources to complete the operation. In cases of
516 /// @c acquire methods returning this error, This can be avoided by
517 /// releasing previously acquired objects before acquiring new ones.
518 AR_ERROR_RESOURCE_EXHAUSTED = -11,
519
520 /// Acquire failed because the data isn't available yet for the current
521 /// frame. For example, acquire the image metadata may fail with this error
522 /// because the camera hasn't fully started.
523 AR_ERROR_NOT_YET_AVAILABLE = -12,
524
525 /// The android camera has been reallocated to a higher priority app or is
526 /// otherwise unavailable.
527 AR_ERROR_CAMERA_NOT_AVAILABLE = -13,
528
529 /// The host/resolve function call failed because the Session is not
530 /// configured for cloud anchors.
531 AR_ERROR_CLOUD_ANCHORS_NOT_CONFIGURED = -14,
532
533 /// ArSession_configure() failed because the specified configuration
534 /// required the Android INTERNET permission, which the application did not
535 /// have.
536 AR_ERROR_INTERNET_PERMISSION_NOT_GRANTED = -15,
537
538 /// HostCloudAnchor() failed because the anchor is not a type of anchor that
539 /// is currently supported for hosting.
540 AR_ERROR_ANCHOR_NOT_SUPPORTED_FOR_HOSTING = -16,
541
542 /// An image with insufficient quality (e.g. too few features) was attempted
543 /// to be added to the image database.
544 AR_ERROR_IMAGE_INSUFFICIENT_QUALITY = -17,
545
546 /// The data passed in for this operation was not in a valid format.
547 AR_ERROR_DATA_INVALID_FORMAT = -18,
548
549 /// The data passed in for this operation is not supported by this version
550 /// of the SDK.
551 AR_ERROR_DATA_UNSUPPORTED_VERSION = -19,
552
553 /// The ARCore APK is not installed on this device.
554 AR_UNAVAILABLE_ARCORE_NOT_INSTALLED = -100,
555
556 /// The device is not currently compatible with ARCore.
557 AR_UNAVAILABLE_DEVICE_NOT_COMPATIBLE = -101,
558
559 /// The ARCore APK currently installed on device is too old and needs to be
560 /// updated.
561 AR_UNAVAILABLE_APK_TOO_OLD = -103,
562
563 /// The ARCore APK currently installed no longer supports the ARCore SDK
564 /// that the application was built with.
565 AR_UNAVAILABLE_SDK_TOO_OLD = -104,
566
567 /// The user declined installation of the ARCore APK during this run of the
568 /// application and the current request was not marked as user-initiated.
569 AR_UNAVAILABLE_USER_DECLINED_INSTALLATION = -105};

◆ AR_DEFINE_ENUM() [2/2]

AR_DEFINE_ENUM ( ArTrackingState  )

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

The object is currently tracked and its pose is current.

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.

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

Definition at line 574 of file arcore_c_api.h.

574 {
575 /// The object is currently tracked and its pose is current.
576 AR_TRACKING_STATE_TRACKING = 0,
577
578 /// ARCore has paused tracking this object, but may resume tracking it in
579 /// the future. This can happen if device tracking is lost, if the user
580 /// enters a new space, or if the Session is currently paused. When in this
581 /// state, the positional properties of the object may be wildly inaccurate
582 /// and should not be used.
583 AR_TRACKING_STATE_PAUSED = 1,
584
585 /// ARCore has stopped tracking this Trackable and will never resume
586 /// tracking it.
587 AR_TRACKING_STATE_STOPPED = 2};