Stay organized with collections
Save and categorize content based on your preferences.
GARRooftopAnchorState
Summary
Enumerations
GARRooftopAnchorState
GARRooftopAnchorState
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-14 UTC.
[null,null,["Last updated 2025-07-14 UTC."],[[["\u003cp\u003e\u003ccode\u003eGARRooftopAnchorState\u003c/code\u003e describes the status of an asynchronous operation to create a rooftop anchor in ARCore, initiated by \u003ccode\u003ecreateAnchorWithCoordinate:altitudeAboveRooftop:eastUpSouthQAnchor:completionHandler:error:\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis state can be accessed through the \u003ccode\u003eresultRooftopAnchorState\u003c/code\u003e property of \u003ccode\u003eGARCreateAnchorOnRooftopFuture\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eVarious states like \u003ccode\u003eSuccess\u003c/code\u003e, \u003ccode\u003eErrorInternal\u003c/code\u003e, \u003ccode\u003eErrorNotAuthorized\u003c/code\u003e, \u003ccode\u003eErrorUnsupportedLocation\u003c/code\u003e, and \u003ccode\u003eNone\u003c/code\u003e indicate the outcome of the anchor creation process, providing details on success or specific failure reasons.\u003c/p\u003e\n"],["\u003cp\u003eRooftop anchors may transition to \u003ccode\u003eGARRooftopAnchorStateNone\u003c/code\u003e if Geospatial Mode is disabled in the AR session.\u003c/p\u003e\n"]]],["`GARRooftopAnchorState` details the status of an asynchronous operation creating a rooftop anchor, accessible via `GARCreateAnchorOnRooftopFuture.resultRooftopAnchorState`. States include `GARRooftopAnchorStateNone` (not a rooftop anchor or invalid), `GARRooftopAnchorStateSuccess` (successfully resolved), `GARRooftopAnchorStateErrorInternal` (internal error), `GARRooftopAnchorStateErrorNotAuthorized` (authentication or authorization failure), and `GARRooftopAnchorStateErrorUnsupportedLocation` (no rooftop/terrain info available). Each state provides information on the outcome of creating a Rooftop anchor.\n"],null,["# GARRooftopAnchorState\n=====================\n\nSummary\n-------\n\n| ### Enumerations ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [GARRooftopAnchorState](#garrooftopanchorstate)`{` ` `[GARRooftopAnchorStateNone](#garrooftopanchorstatenone)` = 0,` ` `[GARRooftopAnchorStateSuccess](#garrooftopanchorstatesuccess)` = 1,` ` `[GARRooftopAnchorStateErrorInternal](#garrooftopanchorstateerrorinternal)` = -1,` ` `[GARRooftopAnchorStateErrorNotAuthorized](#garrooftopanchorstateerrornotauthorized)` = -2,` ` `[GARRooftopAnchorStateErrorUnsupportedLocation](#garrooftopanchorstateerrorunsupportedlocation)` = -3` `}` | enum Describes the state of an asynchronous operation launched by [createAnchorWithCoordinate:altitudeAboveRooftop:eastUpSouthQAnchor:completionHandler:error: (GARSession(Geospatial))](/ar/reference/ios/category/GARSession(Geospatial)#createanchorwithcoordinate:altitudeaboverooftop:eastupsouthqanchor:completionhandler:error:). |\n\nEnumerations\n------------\n\n### GARRooftopAnchorState\n\n```text\n GARRooftopAnchorState\n``` \nDescribes the state of an asynchronous operation launched by [createAnchorWithCoordinate:altitudeAboveRooftop:eastUpSouthQAnchor:completionHandler:error: (GARSession(Geospatial))](/ar/reference/ios/category/GARSession(Geospatial)#createanchorwithcoordinate:altitudeaboverooftop:eastupsouthqanchor:completionhandler:error:).\n\nObtained by [GARCreateAnchorOnRooftopFuture.resultRooftopAnchorState](/ar/reference/ios/interface/GARCreateAnchorOnRooftopFuture#resultrooftopanchorstate).\n\n| Properties ||\n|-----------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| GARRooftopAnchorStateErrorInternal | Internal error. No recommended mitigation. |\n| GARRooftopAnchorStateErrorNotAuthorized | The operation failed due to an authentication or authorization error. This may occur due to a number of reasons: - The Google Cloud project may not have enabled the ARCore API. - If the session was created with an API Key, the API Key may be invalid or deleted, or restricted to exclude the app's bundle Id. - If the session was not created with an API Key, a token may not have been provided, or the provided token may be invalid. - The requested operation may not be permitted. \u003cbr /\u003e |\n| GARRooftopAnchorStateErrorUnsupportedLocation | There is no rooftop or terrain info at this location, such as the center of the ocean. |\n| GARRooftopAnchorStateNone | This anchor is not a Rooftop anchor, or the Rooftop anchor has become invalid due to [GARGeospatialModeDisabled](/ar/reference/ios/group/GARGeospatialMode#gargeospatialmodedisabled) being configured on the [GARSession](/ar/reference/ios/interface/GARSession#interface_g_a_r_session). All Rooftop anchors transition to [GARRooftopAnchorStateNone](/ar/reference/ios/group/GARRooftopAnchorState#garrooftopanchorstatenone) when [GARGeospatialModeDisabled](/ar/reference/ios/group/GARGeospatialMode#gargeospatialmodedisabled) becomes active on the [GARSession](/ar/reference/ios/interface/GARSession#interface_g_a_r_session). |\n| GARRooftopAnchorStateSuccess | This anchor has been resolved successfully. |"]]