### ArCoreApk requestInstall Method Source: https://developers.google.com/ar/reference/java/com/google/ar/core/ArCoreApk.md.txt Initiates the installation of ARCore when it is needed. This method requires an Activity context and a boolean indicating if the user requested the install, returning the installation status. ```APIDOC ArCoreApk.InstallStatus requestInstall(Activity applicationActivity, boolean userRequestedInstall) Initiates installation of ARCore when needed. Parameters: - applicationActivity: The Android Activity context. - userRequestedInstall: Boolean indicating if the user initiated the install. Returns: ArCoreApk.InstallStatus enum indicating the outcome of the installation request. ``` -------------------------------- ### Google ARCore `requestInstall` Method Source: https://developers.google.com/ar/reference/java/com/google/ar/core/ArCoreApk.md.txt Initiates the installation of ARCore on an Android device. It allows for configurable behavior regarding user prompts and installation status. This method is crucial for ensuring ARCore is available before AR features are used, and it handles various installation states and potential exceptions. ```APIDOC ArCoreApk.InstallStatus requestInstall(Activity applicationActivity, boolean userRequestedInstall, ArCoreApk.InstallBehavior installBehavior, ArCoreApk.UserMessageType messageType) - Initiates installation of ARCore when needed, with configurable behavior. - Parameters: - applicationActivity: Activity - Your application's current activity. Used for launching an intent to display the installation user interface. - userRequestedInstall: boolean - If set, override the previous installation failure message and always show the installation interface. - installBehavior: ArCoreApk.InstallBehavior - Configures how the installation UI is displayed and how the user can exit the process. - messageType: ArCoreApk.UserMessageType - Specifies the type of message to display to the user during installation. - Returns: - ArCoreApk.InstallStatus - An enum indicating the status of the ARCore installation request. - Throws: - FatalException - If an error occurs while checking compatibility or starting installation. - UnavailableDeviceNotCompatibleException - If ARCore is not supported on this device. - UnavailableUserDeclinedInstallationException - If the user previously declined installation and userRequestedInstall is false. ``` ```Java public ArCoreApk.InstallStatus requestInstall( Activity applicationActivity, boolean userRequestedInstall, ArCoreApk.InstallBehavior installBehavior, ArCoreApk.UserMessageType messageType ) ``` -------------------------------- ### ARCore Installation: requestInstall Source: https://developers.google.com/ar/reference/java/com/google/ar/core/ArCoreApk.md.txt This section details a flexible version of the requestInstall method from ARCoreApk, allowing for greater control over the installation process. It covers parameters for managing user education screens, installation behavior, and message display, along with potential exceptions. ```APIDOC com.google.ar.core.ArCoreApk.requestInstall This method provides a more flexible way to request ARCore installation compared to the basic requestInstall(Activity, boolean). It allows the application to control the initial informational dialog and the user's ability to exit or cancel the installation. Parameters: - applicationActivity: android.app.Activity Your application's current activity. Used for launching an intent to display the installation user interface. - userRequestedInstall: boolean If set to true, this parameter overrides previous installation failure messages and always shows the installation interface. - installBehavior: int (enum or flags) Controls the presence of the cancel button on the user education screen and whether tapping outside the education screen or install-in-progress screen causes them to dismiss. - messageType: int (enum or flags) Controls the text of the message displayed before showing the install prompt, or disables the display of this message. Throws: - FatalException Thrown if an error occurs while checking compatibility or starting the installation process. - UnavailableDeviceNotCompatibleException Thrown if ARCore is not supported on the current device. - UnavailableUserDeclinedInstallationException Thrown if the user previously declined installation and userRequestedInstall is set to false. ``` -------------------------------- ### Unity Start Method Source: https://developers.google.com/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/ARCoreExtensions.md.txt The Start method in Unity is called once on the script when the script instance is being loaded. It is used for initialization tasks. ```csharp void Start() ``` -------------------------------- ### ArCoreApk.InstallBehavior Enum Source: https://developers.google.com/ar/reference/java/com/google/ar/core/ArCoreApk.InstallBehavior.md.txt Defines installation behaviors for ARCore, specifying whether installation is optional or required. ```APIDOC ArCoreApk.InstallBehavior Enum Values: OPTIONAL: public static final ArCoreApk.InstallBehavior OPTIONAL - Include Cancel button in initial prompt and allow easily backing out after installation has been initiated. REQUIRED: public static final ArCoreApk.InstallBehavior REQUIRED - Hide the Cancel button during initial prompt and prevent user from exiting via tap-outside. - Note: The BACK button or tapping outside of any marketplace-provided install dialog will still decline the installation. ``` -------------------------------- ### AR Core APK Installation Parameters Source: https://developers.google.com/ar/reference/c/group/ar-core-apk.md.txt Defines the parameters for AR Core APK installation functions, including environment details, activity context, installation behavior, and status reporting. These parameters are crucial for managing the AR Core installation process on Android devices. ```APIDOC ARCoreApk_install: Parameters: - env: The application's JNIEnv object. This is a pointer to the JNI environment, necessary for interacting with the Java Virtual Machine from native code. - application_activity: A JObject referencing the application's current Android Activity. This object provides context for UI operations and system service access. - user_requested_install: Boolean. If set to true, overrides previous installation failure messages and always shows the installation interface to the user. - install_behavior: Enum or integer. Controls the presence of the cancel button on the user education screen and whether tapping outside these screens dismisses them. Specific values define granular control over user interaction during installation. - message_type: Enum or integer. Controls the text of the message displayed before showing the install prompt, or disables the display of this message entirely. Allows customization of user-facing notifications. - out_install_status: Pointer to an ArInstallStatus. Receives the resulting install status upon successful completion. The value is only valid when the function's return value is AR_SUCCESS. This parameter is essential for checking the outcome of the installation attempt. ``` -------------------------------- ### ArCameraIntrinsics_create Example Source: https://developers.google.com/ar/reference/c/group/ar-camera-intrinsics.md.txt Example of allocating an ArCameraIntrinsics object using the ArCameraIntrinsics_create function. ```gdscript func _ready(): var session = get_tree().get_root().get_node("ARSession") # Assuming ARSession node exists var camera_intrinsics = null ArCameraIntrinsics_create(session, camera_intrinsics) if camera_intrinsics: print("Camera intrinsics created successfully.") # Use camera_intrinsics for further operations # Remember to destroy it when done: # ArCameraIntrinsics_destroy(camera_intrinsics) ``` -------------------------------- ### ARCore Installation Request (C API) Source: https://developers.google.com/ar/reference/c/group/ar-core-apk.md.txt Initiates the download and installation of Google Play Services for AR (ARCore) and ARCore device profile data. This function should be called when ARCore is not installed or is outdated, and requires an Android context. It handles user prompts for installation and reports the status. ```APIDOC ArCoreApk_requestInstall: Initiates download and installation of Google Play Services for AR (ARCore) and ARCore device profile data. Signature: ArStatus ArCoreApk_requestInstall( void *env, void *application_activity, int32_t user_requested_install, ArInstallStatus *out_install_status ) Description: This function is used to prompt the user to install or update Google Play Services for AR (ARCore). It should only be called if ArCoreApk_checkAvailability has returned AR_AVAILABILITY_SUPPORTED_APK_TOO_OLD or AR_AVAILABILITY_SUPPORTED_NOT_INSTALLED. Parameters: env: The current thread's JNIEnv object. application_activity: A JOBject for an Android Context. user_requested_install: Set to 1 when the application launches or wishes to enter AR mode to initiate installation. Set to 0 when the activity resumes to check the installation status. out_install_status: A pointer to an ArInstallStatus variable that will be updated with the installation status. Return Values: - AR_SUCCESS: If the operation was successful. - Other ArStatus codes indicating errors. Behavior: - If called with user_requested_install = 1: - If ARCore is installed and up-to-date, out_install_status is set to AR_INSTALL_STATUS_INSTALLED. - If ARCore is not installed or outdated, out_install_status is set to AR_INSTALL_STATUS_INSTALL_REQUESTED, and the activity pauses for user interaction (prompting installation via market://details?id=com.google.ar.core). - If called with user_requested_install = 0 after resuming: - If ARCore is now installed/updated, out_install_status is set to AR_INSTALL_STATUS_INSTALLED. - Otherwise, an error code is returned indicating the reason for failure. Limitations: - Side-loading ARCore on unsupported devices will not work, even if checkAvailability reports support. - For more control over messages and exiting, use ArCoreApk_requestInstallCustom. Related Functions: - ArCoreApk_checkAvailability: Checks the availability status of ARCore. - ArSession_create: Creates an AR session, safe to call after ARCore is installed. ``` -------------------------------- ### ArCoreApk_requestInstallCustom C API Source: https://developers.google.com/ar/reference/c/group/ar-core-apk.md.txt Initiates installation of Google Play Services for AR (ARCore) and required device profile data. This function offers more flexibility than ArCoreApk_requestInstall, allowing control over the initial dialog and installation cancellation. It returns an AR status code indicating the outcome of the installation request. ```C ArStatus ArCoreApk_requestInstallCustom( void *env, void *application_activity, int32_t user_requested_install, ArInstallBehavior install_behavior, ArInstallUserMessageType message_type, ArInstallStatus *out_install_status ) ``` ```APIDOC ArCoreApk_requestInstallCustom: Initiates installation of Google Play Services for AR (ARCore) and required device profile data, with configurable behavior. This is a more flexible version of [ArCoreApk_requestInstall](/ar/reference/c/group/ar-core-apk#arcoreapk_requestinstall), allowing the application control over the initial informational dialog and ease of exiting or cancelling the installation. Refer to [ArCoreApk_requestInstall](/ar/reference/c/group/ar-core-apk#arcoreapk_requestinstall) for correct use and expected runtime behavior. Parameters: env: void * - Pointer to the AR environment. application_activity: void * - Pointer to the application activity. user_requested_install: int32_t - Flag indicating if the user explicitly requested installation. install_behavior: ArInstallBehavior - Configures how the installation process is handled. message_type: ArInstallUserMessageType - Type of message to display to the user. out_install_status: ArInstallStatus * - Pointer to an ArInstallStatus variable to receive the installation status. Returns: [AR_SUCCESS](/ar/reference/c/group/shared-types#ar_success), or any of: - [AR_ERROR_FATAL](/ar/reference/c/group/shared-types#ar_error_fatal) if an error occurs while checking for or requesting installation. - [AR_UNAVAILABLE_DEVICE_NOT_COMPATIBLE](/ar/reference/c/group/shared-types#ar_unavailable_device_not_compatible) if ARCore is not supported on this device. - [AR_UNAVAILABLE_USER_DECLINED_INSTALLATION](/ar/reference/c/group/shared-types#ar_unavailable_user_declined_installation) if the user previously declined installation. ``` -------------------------------- ### UnavailableException Constructor Example Source: https://developers.google.com/ar/reference/java/com/google/ar/core/exceptions/UnavailableException.md.txt Example of how to instantiate the UnavailableException with a custom message. ```Java public UnavailableException( String message ) { // Constructor body not provided in source } ``` -------------------------------- ### TextureNotSetException Constructor Example Source: https://developers.google.com/ar/reference/java/com/google/ar/core/exceptions/TextureNotSetException.md.txt Example of how to instantiate the TextureNotSetException with a custom message. ```java public TextureNotSetException(String message) { super(message); } ``` -------------------------------- ### Get Updated Trackables Example Source: https://developers.google.com/ar/reference/c/group/ar-frame.md.txt Example of how to use ArFrame_getUpdatedTrackables in GDScript to retrieve updated trackables from an AR session. ```gdscript func get_updated_trackables(session, frame): var trackable_list = ArTrackableList_create() ArFrame_getUpdatedTrackables(session, frame, AR_TRACKABLE_PLANE, trackable_list) # Process trackable_list here ArTrackableList_destroy(trackable_list) ``` -------------------------------- ### TextureNotSetException Reference (Java) Source: https://context7_llms Provides links to learn more about and get started with TextureNotSetException in Google AR for Java. This exception signals that a required texture has not been set. ```APIDOC TextureNotSetException - Description: Exception thrown when a required texture is not set before use. - Inheritance: Exception - Related: Rendering ``` -------------------------------- ### ArTrackable Reference (C) Source: https://context7_llms Provides links to learn more about and get started with ArTrackable in Google AR for C. This is a base interface for all trackable AR objects. ```APIDOC ArTrackable - Description: Base interface for all AR objects that can be tracked in the real world. - Methods: - GetTrackingState(ArTrackable*, ArTrackingState*): Retrieves the tracking state of the object. - GetPose(ArTrackable*, ArPose*): Gets the current pose (position and orientation) of the trackable. - Derived Types: ArPlane, ArAugmentedImage, ArFace, ArPoint ``` -------------------------------- ### ArTrack Initialization (C) Source: https://developers.google.com/ar/reference/c/group/ar-track.md.txt Example of initializing an ArTrack using C, demonstrating the function signature and parameter types. ```c void ArTrack_create( const ArSession *session, ArTrack **out_track ); ``` -------------------------------- ### Get Cloud Anchor State Example Source: https://developers.google.com/ar/reference/java/com/google/ar/core/Anchor.md.txt Demonstrates retrieving the current state of a cloud anchor. Note that this method is deprecated. ```java public Anchor.CloudAnchorState getCloudAnchorState() { // Returns the current state of the cloud anchor. return Anchor.CloudAnchorState.NONE; // Placeholder for actual implementation } ``` -------------------------------- ### Get Cloud Anchor ID Example Source: https://developers.google.com/ar/reference/java/com/google/ar/core/Anchor.md.txt Shows how to retrieve the cloud anchor ID for an anchor. Note that this method is deprecated. ```java public String getCloudAnchorId() { // Gets the current cloud anchor ID for this anchor. // Returns an empty string if getCloudAnchorState() returns Anchor.CloudAnchorState.TASK_IN_PROGRESS or Anchor.CloudAnchorState.NONE. return ""; // Placeholder for actual implementation } ``` -------------------------------- ### ArTrack Initialization (GDScript) Source: https://developers.google.com/ar/reference/c/group/ar-track.md.txt Example of initializing an ArTrack using GDScript, demonstrating the function signature and parameter types. ```gdscript func ArTrack_create( session: ArSession, out_track: ArTrack ) -> void: # Initializes an ArTrack. pass ``` -------------------------------- ### ArPoint_getOrientationMode (GDScript) Source: https://developers.google.com/ar/reference/c/group/ar-point.md.txt Example of how to get the orientation mode of an ArPoint using GDScript. This function is part of the ARCore API for Godot. ```GDScript func _ready(): var session = ARVRServer.find_server_by_name("ARCoreVR") if session: var point = session.get_ar_point_by_id(some_point_id) # Assuming you have a point if point: var orientation_mode = point.get_orientation_mode() print("Point orientation mode: ", orientation_mode) ``` -------------------------------- ### ArImage Reference (C) Source: https://context7_llms Provides links to learn more about and get started with ArImage in Google AR for C. This API represents an image captured by the AR camera. ```APIDOC ArImage - Description: Represents a captured image frame from the AR camera. - Properties: - width: Image width in pixels. - height: Image height in pixels. - format: Pixel format of the image. - planes: Array of image planes (e.g., Y, UV). - Usage: Used for feature tracking, depth processing, and rendering. ``` -------------------------------- ### ARCore Recording Start and Stop Methods Source: https://developers.google.com/ar/reference/java/com/google/ar/core/Session.md.txt Provides details on how to initiate and terminate ARCore session recordings. Includes method signatures, parameter descriptions, and potential exceptions for robust integration. ```APIDOC startRecording: Signature: public void startRecording(RecordingConfig recordingConfig) Description: Starts a new MP4 dataset file recording that is written to the specific filesystem path. Existing files will be overwritten. The MP4 video stream (VGA) bitrate is 5Mbps (40Mb per minute). Recording introduces additional overhead and may affect app performance. Session recordings may contain sensitive information. Parameters: - recordingConfig: The RecordingConfig that defines the recording configuration. Throws: - IllegalArgumentException: if recordingConfig is null or ARCore cannot write to the configured output. - IllegalStateException: if recording has been started already. In this case, the existing recording continues. - RecordingFailedException: for other recording failures. stopRecording: Signature: public void stopRecording() Description: Stops recording and flushes unwritten data to disk. The MP4 dataset file is ready to read after this method completes. ``` ```java public void startRecording( RecordingConfig recordingConfig ) ``` ```java public void stopRecording() ``` -------------------------------- ### Config.FocusMode Reference (Java) Source: https://context7_llms Provides links to learn more about and get started with Config.FocusMode in Google AR for Java. This enum controls how the AR session handles focus. ```APIDOC Config.FocusMode - Description: Enum controlling the focus behavior of the ARCore session. - Modes: - AUTO: ARCore automatically manages focus. - FIXED: Focus is fixed, typically at infinity. - Usage: Configures the camera's focus for optimal AR tracking and rendering. ``` -------------------------------- ### Java Object and Interface Methods Source: https://developers.google.com/ar/reference/java/com/google/ar/core/ArCoreApk.InstallBehavior.md.txt Documentation for standard Java methods inherited from Object, Constable, and Comparable interfaces. Includes method signatures and return types. ```APIDOC java.lang.Object Methods: equals(Object arg0) - Checks if this object is equal to another object. - Parameters: - arg0: The object to compare with. - Returns: true if the objects are equal, false otherwise. finalize() - Called by the garbage collector before an object is garbage collected. - Note: This method is deprecated and should not be used. getClass() - Returns the runtime class of this Object. - Returns: a value of type `final Class`. hashCode() - Returns a hash code value for the object. - Returns: an `int` hash code. notify() - Wakes up a single thread that is waiting on this object's monitor. notifyAll() - Wakes up all threads that are waiting on this object's monitor. toString() - Returns a string representation of the object. - Returns: a `String`. wait(long arg0, int arg1) - Causes the current thread to wait until either a thread invokes the notify() method or the given amount of time expires. - Parameters: - arg0: The time to wait in milliseconds. - arg1: The time to wait in nanoseconds. wait(long arg0) - Causes the current thread to wait until either a thread invokes the notify() method or the given amount of time expires. - Parameters: - arg0: The time to wait in milliseconds. wait() - Causes the current thread to wait until another thread invokes the notify() or notifyAll() method or the given amount of time elapses. java.lang.constant.Constable Methods: describeConstable() - Returns an "optional" describing the ConstantDesc, or an empty "optional" if this instance is not representable as a ConstantDesc. - Returns: an `Optional`. java.lang.Comparable Methods: compareTo(ArCoreApk.InstallBehavior arg0) - Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. - Parameters: - arg0: The object to be compared. - Returns: a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. ``` -------------------------------- ### Anchor.CloudAnchorState Reference (Java) Source: https://context7_llms Provides links to learn more about and get started with Anchor.CloudAnchorState in Google AR for Java. This enum defines the possible states of a cloud anchor. ```APIDOC Anchor.CloudAnchorState - Description: Enum representing the state of a cloud anchor. - States: - NONE: The anchor is not a cloud anchor. - SUCCESS: The anchor was successfully hosted or resolved. - ERROR: An error occurred during hosting or resolving. - HOSTING: The anchor is currently being hosted. - RESOLVING: The anchor is currently being resolved. - Related: Anchor, Session.HostCloudAnchorCallback ``` -------------------------------- ### Java Example: Using SharedCamera with ARCore Source: https://developers.google.com/ar/reference/java/com/google/ar/core/SharedCamera.md.txt Demonstrates how to initialize ARCore with shared camera support and configure camera operations. It shows obtaining the SharedCamera instance, using its callback wrappers for camera device and session state management, and adding custom surfaces like an ImageReader. ```java Session sharedSession; SharedCamera sharedCamera; void onCreate(Bundle savedInstanceState) { sharedSession = new Session(context, EnumSet.of(Session.Feature.SHARED_CAMERA)); openCameraForSharing(); createCameraCaptureSession(); // ... } private void openCameraForSharing() { sharedCamera = sharedSession.getSharedCamera(); // Use callback wrapper. CameraManager.openCamera( cameraID, sharedCamera.createARDeviceStateCallback(appDeviceStateCallback, appHandler), appHandler); } private void createCameraCaptureSession() { // Get list of ARCore created surfaces. Required for ARCore tracking. ArrayList surfaceList = sharedCamera.getSurfaces(); // (Optional) Add a custom CPU image reader surface on devices that support CPU image access. ImageReader cpuImageReader = ImageReader.newInstance(...); surfaceList.add(cpuImageReader.getSurface()); // Use callback wrapper. cameraDevice.createCaptureSession( surfaceList, sharedCamera.createARSessionStateCallback( appSessionStateCallback, appHandler), appHandler); } ``` -------------------------------- ### Session.FeatureMapQuality Reference (Java) Source: https://context7_llms Provides links to learn more about and get started with Session.FeatureMapQuality in Google AR for Java. This enum indicates the quality of the feature map for AR tracking. ```APIDOC Session.FeatureMapQuality - Description: Enum indicating the quality of the feature map generated by ARCore. - Qualities: - UNKNOWN: Feature map quality is unknown. - POOR: The environment has few distinct features, leading to poor tracking. - MODERATE: The environment has a moderate number of features. - GOOD: The environment has abundant features, leading to good tracking. - Usage: Used to assess the suitability of the current environment for AR tracking. ``` -------------------------------- ### UnavailableUserDeclinedInstallationException Class Source: https://developers.google.com/ar/reference/java/com/google/ar/core/exceptions/UnavailableUserDeclinedInstallationException.md.txt Documentation for the UnavailableUserDeclinedInstallationException class, detailing its purpose, constructors, and inherited methods from java.lang.Throwable and java.lang.Object. ```APIDOC UnavailableUserDeclinedInstallationException: Thrown when ArCoreApk.requestInstall(Activity, boolean) is called after the user had previously cancelled installation. Public Constructors: UnavailableUserDeclinedInstallationException() - Default constructor. UnavailableUserDeclinedInstallationException(String message) - Parameters: - message: The detail message. Inherited Methods from java.lang.Throwable: addSuppressed(Throwable arg0): synchronized final void - Adds the specified cause and its suppressed exceptions to the exception that was caught and is being rethrown. fillInStackTrace(): synchronized Throwable - Fills in the execution stack trace of the captured stack frame. getCause(): synchronized Throwable - Returns the cause of this throwable or null if the cause is nonexistent or unknown. getLocalizedMessage(): String - Returns a localized descriptive message of this throwable. getMessage(): String - Returns the detail message string of this throwable. getStackTrace(): StackTraceElement[] - Returns representing this throwable's stack trace: the last call in the stack array is the deepest nested call. getSuppressed(): synchronized Throwable[] - Returns an array containing all of the exceptions that were suppressed, and therefore never made their way into the causal chain. initCause(Throwable arg0): synchronized Throwable - Cause exception that was caught to be rethrown, or null if the cause is nonexistent or unknown. printStackTrace(): void - Prints this throwable's stack trace to the standard error stream. printStackTrace(PrintWriter arg0): void - Prints this throwable's stack trace to the specified print writer. printStackTrace(PrintStream arg0): void - Prints this throwable's stack trace to the specified print stream. setStackTrace(StackTraceElement[] arg0): void - Sets the stack trace elements that will be returned by getStackTrace() and printed by printStackTrace() and related methods. toString(): String - Returns a string representation of this throwable. Inherited Methods from java.lang.Object: clone(): Object - Creates and returns a copy of this object. equals(Object arg0): boolean - Indicates whether some other object is "equal to" this one. ``` -------------------------------- ### Config.CloudAnchorMode Reference (Java) Source: https://context7_llms Provides links to learn more about and get started with Config.CloudAnchorMode in Google AR for Java. This enum specifies the cloud anchor mode for the AR session. ```APIDOC Config.CloudAnchorMode - Description: Enum specifying the cloud anchor mode for an ARCore session. - Modes: - DISABLED: Cloud anchor functionality is disabled. - ENABLED: Cloud anchor functionality is enabled. - Usage: Set in the ARCore Session configuration to enable cloud anchor features. ``` -------------------------------- ### Java Object Methods and UnavailableUserDeclinedInstallationException Source: https://developers.google.com/ar/reference/java/com/google/ar/core/exceptions/UnavailableUserDeclinedInstallationException.md.txt Documentation for standard Java Object methods and the UnavailableUserDeclinedInstallationException class, detailing its constructors and parameters. ```java APIDOC: // Common Java Object Methods finalize() - Called by the garbage collector when the object is no longer reachable. getClass() - Returns the runtime class of this Object. hashCode() - Returns a hash code value for the object. notify() - Wakes up a single thread that is waiting on this object's monitor. notifyAll() - Wakes up all threads that are waiting on this object's monitor. tostring() - Returns a string representation of the object. wait(long arg0, int arg1) - Causes the current thread to wait until it is awakened by a call to the notify() method or the notifyAll() method for this object, or until a specified amount of time has elapsed. wait(long arg0) - Causes the current thread to wait until it is awakened by a call to the notify() method or the notifyAll() method for this object, or until a specified amount of time has elapsed. wait() - Causes the current thread to wait until it is awakened by a call to the notify() method or the notifyAll() method for this object. // UnavailableUserDeclinedInstallationException UnavailableUserDeclinedInstallationException() - Constructs a new UnavailableUserDeclinedInstallationException with no detail message. UnavailableUserDeclinedInstallationException(String message) - Constructs a new UnavailableUserDeclinedInstallationException with the specified detail message. - Parameters: - message: String - The detail message. ``` -------------------------------- ### VpsAvailabilityFuture API Source: https://developers.google.com/ar/reference/java/com/google/ar/core/VpsAvailabilityFuture.md.txt Documentation for the VpsAvailabilityFuture class, its methods, and their usage within the Google AR Core SDK. This class represents a handle to an asynchronous operation launched by Session.checkVpsAvailabilityAsync. ```APIDOC VpsAvailabilityFuture: Handles an asynchronous operation for checking VPS availability. Public Methods: cancel(): boolean Tries to cancel the execution of this operation. If the operation was cancelled by this invocation, this method returns true and the associated callback (if any) will never be invoked. Signature: public boolean cancel() getResult(): VpsAvailability Returns the result of the async operation. The returned result is only valid when getState() returns FutureState.DONE. Signature: public VpsAvailability getResult() getState(): FutureState Get the current state of the future. Signature: public FutureState getState() Inherited Methods (from com.google.ar.core.Future): cancel(): boolean Tries to cancel the execution of this operation. Signature: abstract boolean cancel() getState(): FutureState Get the current state of the future. Signature: abstract FutureState getState() Inherited Methods (from java.lang.Object): clone(): Object equals(Object arg0): boolean finalize(): void getClass(): Class hashCode(): int notify(): void notifyAll(): void toString(): String wait(long arg0, int arg1): void wait(long arg0): void wait(): void ``` -------------------------------- ### ArCameraIntrinsics Reference (C) Source: https://context7_llms Provides links to learn more about and get started with ArCameraIntrinsics in Google AR for C. This API provides information about the camera's intrinsic parameters. ```APIDOC ArCameraIntrinsics - Description: Represents the intrinsic parameters of the camera. - Properties: - focalLength[0]: Focal length in the x-direction. - focalLength[1]: Focal length in the y-direction. - principalPoint[0]: Principal point x-coordinate. - principalPoint[1]: Principal point y-coordinate. - Usage: Essential for computer vision tasks like depth estimation and 3D reconstruction. ``` -------------------------------- ### Java Comparable Interface Method Source: https://developers.google.com/ar/reference/java/com/google/ar/core/VpsAvailability.md.txt Documentation for the compareTo method from the java.lang.Comparable interface. ```APIDOC java.lang.Comparable: compareTo(VpsAvailability arg0) - Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. ``` -------------------------------- ### StreetscapeGeometry.Quality Reference (Java) Source: https://context7_llms Provides links to learn more about and get started with StreetscapeGeometry.Quality in Google AR for Java. This enum defines the quality level of streetscape geometry data. ```APIDOC StreetscapeGeometry.Quality - Description: Enum defining the quality level of streetscape geometry data. - Qualities: - UNKNOWN: Quality is unknown. - VERTEX_ONLY: Geometry is available but lacks detailed mesh information. - MESH_ONLY: Geometry has mesh data but may lack vertex details. - FULL: Geometry includes both detailed vertex and mesh information. - Usage: Indicates the level of detail available for real-world geometry. ``` -------------------------------- ### ArHostCloudAnchorFuture Reference (C) Source: https://context7_llms Provides links to learn more about and get started with ArHostCloudAnchorFuture in Google AR for C. This API handles the asynchronous operation of hosting a cloud anchor. ```APIDOC ArHostCloudAnchorFuture - Description: Represents an asynchronous operation to host a cloud anchor. - Methods: - GetResult(ArHostCloudAnchorFuture*, ArAnchor**): Retrieves the result of the hosting operation. - GetState(ArHostCloudAnchorFuture*): Gets the current state of the future. - Related: ArAnchor, ArSession ``` -------------------------------- ### ArCamera Parameters Example Source: https://developers.google.com/ar/reference/c/group/ar-camera.md.txt Illustrates the parameters used with ARCore camera functions, showing their types and descriptions. ```povray void ArCamera_release( ArCamera *camera ) Parameters: | `session` | The ARCore session | | `camera` | The session's camera. | | `out_col_major_4x4` | Pointer to an array of 16 floats, to be filled with a column-major homogenous transformation matrix, as used by OpenGL. | ``` -------------------------------- ### Java Object Class Methods Source: https://developers.google.com/ar/reference/java/com/google/ar/core/VpsAvailability.md.txt Documentation for common methods inherited from the java.lang.Object class, including clone, equals, hashCode, and toString. ```APIDOC java.lang.Object: clone() - Creates and returns a copy of this object. equals(Object arg0) - Indicates whether some other object is "equal to" this one. finalize() - Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. getClass() - Returns the runtime class of this Object. hashCode() - Returns a hash code value for the object. notify() - Wakes up a single thread that is waiting on this object's monitor. notifyAll() - Wakes up all threads that are waiting on this object's monitor. toString() - Returns a string representation of the object. wait(long arg0, int arg1) - Causes the current thread to wait until either a thread invokes the notify() method or skip method for this object and this thread is awakened, or some other thread interrupts the current thread, or a specified amount of time has elapsed. wait(long arg0) - Causes the current thread to wait until either a thread invokes the notify() method or skip method for this object and this thread is awakened, or some other thread interrupts the current thread, or a specified amount of time has elapsed. wait() - Causes the current thread to wait until either a thread invokes the notify() method or skip method for this object and this thread is awakened, or some other thread interrupts the current thread. ``` -------------------------------- ### InterruptiblePromise Class Reference (Unity) Source: https://context7_llms Provides links to learn more about and get started with the InterruptiblePromise class in Google AR for Unity. This class handles asynchronous operations that can be interrupted. ```APIDOC InterruptiblePromise - Description: A promise that can be cancelled or interrupted during its execution. - Methods: - Cancel(): Interrupts the promise's operation. - IsCanceled(): Checks if the promise has been cancelled. - Usage: Useful for long-running async tasks that might need to be aborted. ``` -------------------------------- ### ImageInsufficientQualityException Reference (Java) Source: https://context7_llms Provides links to learn more about and get started with ImageInsufficientQualityException in Google AR for Java. This exception indicates issues with image quality for AR tracking. ```APIDOC ImageInsufficientQualityException - Description: Exception thrown when an image provided to ARCore has insufficient quality for tracking. - Inheritance: Exception - Related: TrackingFailureReason ``` -------------------------------- ### InstantPlacementPoint API Reference Source: https://developers.google.com/ar/reference/java/com/google/ar/core/InstantPlacementPoint.md.txt Provides methods for interacting with Instant Placement Points in Google AR Core, including retrieving tracking state, pose, and associated anchors. Also includes inherited methods from java.lang.Object. ```APIDOC InstantPlacementPoint Methods: equals(Object obj) - Indicates whether some other object is a Trackable referencing the same logical trackable as this one. - Parameters: - obj: Object to compare with. - Returns: boolean: true if the objects refer to the same trackable, false otherwise. getAnchors() - Gets the Anchors attached to this trackable. - Parameters: None. - Returns: Collection: A collection of Anchors. getPose() - Gets the pose of the Instant Placement point. - Parameters: None. - Returns: Pose: The pose of the point. getTrackingMethod() - Returns the current InstantPlacementPoint.TrackingMethod for this InstantPlacementPoint. - Parameters: None. - Returns: InstantPlacementPoint.TrackingMethod: The tracking method. getTrackingState() - Gets this trackable's TrackingState. - Parameters: None. - Returns: TrackingState: The tracking state. hashCode() - Returns a hash code value for the object. - Parameters: None. - Returns: int: A hash code value for this object. ``` ```APIDOC Inherited Methods from java.lang.Object: clone() - Creates and returns a copy of this object. - Parameters: None. - Returns: Object: A clone of this instance. equals(Object arg0) - Compares this object to the specified object. The result is true if and only if the argument is not null and is a Object object that represents the same object as this object. - Parameters: - arg0: the reference object with which to compare. - Returns: boolean: true if this object is the same as the obj argument; false otherwise. finalize() - Called by the garbage collector to finalize the object. - Parameters: None. - Returns: void. getClass() - Returns the runtime class of this Object. - Parameters: None. - Returns: Class: the closest subclass of Object that represents the runtime class of the specified object. hashCode() - Returns a hash code value for the object. - Parameters: None. - Returns: int: a hash code value for this object. notify() - Wakes up a single thread that is waiting on this object's monitor. - Parameters: None. - Returns: void. notifyAll() - Wakes up all threads that call this object's wait method. - Parameters: None. - Returns: void. tostring() - Returns a string representation of the object. - Parameters: None. - Returns: String: a string representation of the object. wait(long arg0, int arg1) - Causes the current thread to wait until it is awakened by a call to the notify() method or a notifyAll() method for this object, or until a specified amount of time has elapsed. - Parameters: - arg0: the maximum time to wait in milliseconds. - arg1: the maximum time to wait in nanoseconds. - Returns: void. wait(long arg0) - Causes the current thread to wait until it is awakened by a call to the notify() method or a notifyAll() method for this object, or until a specified amount of time has elapsed. - Parameters: - arg0: the maximum time to wait in milliseconds. - Returns: void. wait() - Causes the current thread to wait until it is awakened by a call to the notify() method or a notifyAll() method for this object. - Parameters: None. - Returns: void. ``` -------------------------------- ### AR Instant Placement Point Tracking Methods Source: https://developers.google.com/ar/reference/c/group/ar-instant-placement-point.md.txt Describes the different tracking methods for AR Instant Placement Points, detailing their behavior, limitations, and associated ARCore states. ```APIDOC AR_INSTANT_PLACEMENT_POINT_TRACKING_METHOD_FULL_TRACKING: The ArInstantPlacementPoint is being tracked normally and ArInstantPlacementPoint_getPose is using a pose fully determined by ARCore. ARCore doesn't limit the number of Instant Placement points with this tracking method that are being tracked concurrently. AR_INSTANT_PLACEMENT_POINT_TRACKING_METHOD_NOT_TRACKING: The ArInstantPlacementPoint is not currently being tracked. The ArTrackingState is AR_TRACKING_STATE_PAUSED or AR_TRACKING_STATE_STOPPED. AR_INSTANT_PLACEMENT_POINT_TRACKING_METHOD_SCREENSPACE_WITH_APPROXIMATE_DISTANCE: The ArInstantPlacementPoint is currently being tracked in screen space and the pose returned by ArInstantPlacementPoint_getPose is being estimated using the approximate distance provided to ArFrame_hitTestInstantPlacement. ARCore concurrently tracks at most 20 Instant Placement points with this tracking method. As additional Instant Placement points with this tracking method are created, the oldest points will become permanently AR_TRACKING_STATE_STOPPED in order to maintain the maximum number of concurrently tracked points. ``` -------------------------------- ### GARGeospatialTransform Class Reference (iOS) Source: https://context7_llms Provides links to learn more about and get started with the GARGeospatialTransform class in Google AR for iOS. This class represents the geospatial pose of an AR anchor. ```APIDOC GARGeospatialTransform - Description: Represents the geospatial pose (latitude, longitude, altitude, heading) of an AR anchor. - Properties: - latitude: The latitude of the anchor. - longitude: The longitude of the anchor. - altitude: The altitude of the anchor. - heading: The heading (orientation) of the anchor. - Related: GARAnchor, GARSession ``` -------------------------------- ### Using Instant Placement to Place an Object Source: https://developers.google.com/ar/reference/java/com/google/ar/core/InstantPlacementPoint.md.txt Demonstrates how to use ARCore's InstantPlacementPoint to place an object in the AR scene. It includes session configuration, handling user taps, performing hit tests, creating anchors, and disabling instant placement after successful placement. ```java class ArPlacementActivity { private Session session = null; private boolean placementIsDone = false; private float tapX, tapY; private Anchor anchor; public void createSession() { session = new Session(this); Config config = new Config(session); config.setInstantPlacementMode(InstantPlacementMode.LOCAL_Y_UP); session.configure(config); } public void onDrawFrame(GL10 gl) { Frame frame = session.update(); // Place an object on tap. if (!placementIsDone && didUserTap()) { // Use estimated distance from the user's device to the real world, based // on how we expect the app to be used by users. float approximateDistanceMeters = 1.0f; List results = frame.hitTestInstantPlacement(tapX, tapY, approximateDistanceMeters); if (!results.isEmpty()) { HitResult hit = results.get(0); InstantPlacementPoint point = (InstantPlacementPoint) hit.getTrackable(); anchor = point.createAnchor(point.getPose()); placementIsDone = true; disableInstantPlacement(); } } } private void disableInstantPlacement() { // When the placement is done, you can disable Instant Placement to save computing. Config config = new Config(session); config.setInstantPlacementMode(InstantPlacementMode.DISABLED); session.configure(config); } // Placeholder methods for demonstration private boolean didUserTap() { // Implement logic to check if user tapped return false; } } ``` -------------------------------- ### ARGeospatialCreatorOrigin Class Reference (Unity) Source: https://context7_llms Provides links to learn more about and get started with the ARGeospatialCreatorOrigin class in Google AR for Unity. This class manages geospatial origins for AR experiences. ```APIDOC ARGeospatialCreatorOrigin - Description: Represents the origin point for geospatial AR content in Unity. - Methods: - SetLatitudeLongitudeAltitude(lat, lon, alt): Sets the origin's geospatial coordinates. - GetLatitudeLongitudeAltitude(): Retrieves the origin's geospatial coordinates. - Related: GeospatialCreator, ARPose ``` -------------------------------- ### ARCore Initialization Check Source: https://developers.google.com/ar/reference/java/com/google/ar/core/Session.md.txt Demonstrates how to check for ARCore availability and request installation, which is a prerequisite for creating a Session. ```APIDOC ArCoreApk Methods for Initialization: checkAvailability(Context context): Description: Checks if ARCore is installed and up to date on the device. Parameters: - context: The Android Context. Returns: - ArCoreApk.Availability.SUPPORTED_INSTALLED: If ARCore is installed and supported. - Other Availability enum values: Indicate different states like not supported or needs installation. requestInstall(Activity activity, boolean installIfNecessary): Description: Requests the installation or update of ARCore. Parameters: - activity: The Activity context to launch the installation flow. - installIfNecessary: If true, prompts the user to install ARCore if it's not available. Returns: - ArCoreApk.InstallStatus.INSTALLED: If ARCore is installed or the installation was successful. - Other InstallStatus enum values: Indicate installation status or user cancellation. ``` -------------------------------- ### AugmentedImageDatabase Reference (Java) Source: https://context7_llms Provides links to learn more about and get started with AugmentedImageDatabase in Google AR for Java. This technology enables the creation of world-scale, immersive augmented reality experiences. ```APIDOC AugmentedImageDatabase - Description: Manages a collection of augmented images for ARCore. - Usage: Used to detect and track real-world images within an AR session. - Related: AugmentedImage, Trackable ```