**Name String**

`XR_ANDROID_device_anchor_persistence`

**Extension Type**

Instance extension

**Registered Extension Number**

458

**Revision**

1

**Extension and Version Dependencies**

[`XR_EXT_uuid`](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XR_EXT_uuid)and[`XR_ANDROID_trackables`](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_trackables)

**Last Modified Date**

2024-10-10

**IP Status**

No known IP claims.

**Contributors**

Nihav Jain, Google

Levana Chen, Google

Spencer Quin, Google

Kenny Vercaemer, Google

## Overview

This extension allows the application to persist, retrieve, and unpersist anchors on the current device for the current user, across applications and device sessions.
| **Caution:**   
|
| **Permissions**   
|
| Android applications**must** have the`android.permission.SCENE_UNDERSTANDING_COARSE`permission listed in their manifest as this extension depends on[`XR_ANDROID_trackables`](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_trackables)and exposes the geometry of the environment. The`android.permission.SCENE_UNDERSTANDING_COARSE`permission is considered a dangerous permission. The application**must** request the permission at runtime to use these functions:  
| `xrCreateDeviceAnchorPersistenceANDROID`  
| (protection level: /dangerous)

## Inspect system capability

The[XrSystemDeviceAnchorPersistencePropertiesANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrSystemDeviceAnchorPersistencePropertiesANDROID)structure is defined as:  

    typedef struct XrSystemDeviceAnchorPersistencePropertiesANDROID {
        XrStructureType    type;
        void*              next;
        XrBool32           supportsAnchorPersistence;
    } XrSystemDeviceAnchorPersistencePropertiesANDROID;

### Member Descriptions

- `type`is the[XrStructureType](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrStructureType)of this structure.
- `next`is`NULL`or a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR or this extension.
- `supportsAnchorPersistence`is an[`XrBool32`](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrBool32)indicating if the current system supports anchor persistence for spatial anchors.

An application**can** inspect whether the system is capable of persisting spatial anchors (see[xrCreateAnchorSpaceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_trackables#xrCreateAnchorSpaceANDROID)) by extending the[XrSystemProperties](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrSystemProperties)with[XrSystemDeviceAnchorPersistencePropertiesANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrSystemDeviceAnchorPersistencePropertiesANDROID)structure when calling[xrGetSystemProperties](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#xrGetSystemProperties). For the supported trackable anchors, an application**can** use[xrEnumerateSupportedPersistenceAnchorTypesANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrEnumerateSupportedPersistenceAnchorTypesANDROID)to query the supported types.

If`XR_FALSE`is returned for`supportsAnchorPersistence`, then`XR_ERROR_FEATURE_UNSUPPORTED`will be returned from device anchor persistence functions that operate on a spatial anchor.

### Valid Usage (Implicit)

- The[`XR_ANDROID_device_anchor_persistence`](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XR_ANDROID_device_anchor_persistence)extension**must** be enabled prior to using[XrSystemDeviceAnchorPersistencePropertiesANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrSystemDeviceAnchorPersistencePropertiesANDROID)
- `type`**must** be`XR_TYPE_SYSTEM_DEVICE_ANCHOR_PERSISTENCE_PROPERTIES_ANDROID`
- `next`**must** be`NULL`or a valid pointer to the[next structure in a structure chain](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-valid-usage-for-structure-pointer-chains)

The[xrEnumerateSupportedPersistenceAnchorTypesANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrEnumerateSupportedPersistenceAnchorTypesANDROID)function is defined as:  

    XrResult xrEnumerateSupportedPersistenceAnchorTypesANDROID(
        XrInstance                                  instance,
        XrSystemId                                  systemId,
        uint32_t                                    trackableTypeCapacityInput,
        uint32_t*                                   trackableTypeCountOutput,
        XrTrackableTypeANDROID*                     trackableTypes);

### Parameter Descriptions

- `session`is the[XrSession](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrSession)that creates the[XrDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceANDROID).
- `trackableTypeCapacityInput`is the capacity of the`trackableTypes`, or 0 to retrieve the required capacity.
- `trackableTypeCountOutput`is a pointer to the count of the array, or a pointer to the required capacity in the case that`trackableTypeCapacityInput`is insufficient.
- `trackableTypes`is a pointer to an array of[XrTrackableTypeANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_trackables#XrTrackableTypeANDROID), but**can** be`NULL`if`trackableTypeCapacityInput`is`0`.
- See the[Buffer Size Parameters](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-buffer-size-parameters)section for a detailed description of retrieving the required`trackableTypes`size.

The application**can** use[xrEnumerateSupportedPersistenceAnchorTypesANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrEnumerateSupportedPersistenceAnchorTypesANDROID)to check for support of anchor persistence on other[XrTrackableTypeANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_trackables#XrTrackableTypeANDROID)trackables.

If a given[XrTrackableTypeANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_trackables#XrTrackableTypeANDROID)is not returned in the`trackableTypes`array, then`XR_ERROR_FEATURE_UNSUPPORTED`will be returned from device anchor persistence functions that operate on an anchor of that type.

### Valid Usage (Implicit)

- The[`XR_ANDROID_device_anchor_persistence`](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XR_ANDROID_device_anchor_persistence)extension**must** be enabled prior to calling[xrEnumerateSupportedPersistenceAnchorTypesANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrEnumerateSupportedPersistenceAnchorTypesANDROID)
- `instance`**must** be a valid[XrInstance](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrInstance)handle
- `trackableTypeCountOutput`**must** be a pointer to a`uint32_t`value
- If`trackableTypeCapacityInput`is not`0, trackableTypes`**must** be a pointer to an array of`trackableTypeCapacityInput`[XrTrackableTypeANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_trackables#XrTrackableTypeANDROID)values

### Return Codes

[**Success**](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-successcodes)

- `XR_SUCCESS`

[**Failure**](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-errorcodes)

- `XR_ERROR_SYSTEM_INVALID`
- `XR_ERROR_VALIDATION_FAILURE`
- `XR_ERROR_RUNTIME_FAILURE`
- `XR_ERROR_HANDLE_INVALID`
- `XR_ERROR_INSTANCE_LOST`
- `XR_ERROR_SIZE_INSUFFICIENT`
- `XR_ERROR_FUNCTION_UNSUPPORTED`

## Create a device anchor persistence handle

An[XrDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceANDROID)is a handle that represents the resources required to persist and keep track of persisted anchors.  

    XR_DEFINE_HANDLE(XrDeviceAnchorPersistenceANDROID)

The[xrCreateDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrCreateDeviceAnchorPersistenceANDROID)function is defined as:  

    XrResult xrCreateDeviceAnchorPersistenceANDROID(
        XrSession                                   session,
        const XrDeviceAnchorPersistenceCreateInfoANDROID* createInfo,
        XrDeviceAnchorPersistenceANDROID*           outHandle);

### Parameter Descriptions

- `session`is the[XrSession](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrSession)that creates the[XrDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceANDROID).
- `createInfo`is the[XrDeviceAnchorPersistenceCreateInfoANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceCreateInfoANDROID)containing parameters for the[XrDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceANDROID).
- `outHandle`is a pointer to a handle in which the created[XrDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceANDROID)is returned.

An application**can** create an[XrDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceANDROID)handle by calling[xrCreateDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrCreateDeviceAnchorPersistenceANDROID). The[XrDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceANDROID)**can** be used in subsequent API calls to persist or unpersist anchors. The[XrDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceANDROID)handle**must** be eventually freed using the[xrDestroyDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrDestroyDeviceAnchorPersistenceANDROID)function.

### Valid Usage (Implicit)

- The[`XR_ANDROID_device_anchor_persistence`](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XR_ANDROID_device_anchor_persistence)extension**must** be enabled prior to calling[xrCreateDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrCreateDeviceAnchorPersistenceANDROID)
- `session`**must** be a valid[XrSession](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrSession)handle
- `createInfo`**must** be a pointer to a valid[XrDeviceAnchorPersistenceCreateInfoANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceCreateInfoANDROID)structure
- `outHandle`**must** be a pointer to an[XrDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceANDROID)handle

### Return Codes

[**Success**](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-successcodes)

- `XR_SUCCESS`
- `XR_SESSION_LOSS_PENDING`

[**Failure**](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-errorcodes)

- `XR_ERROR_FUNCTION_UNSUPPORTED`
- `XR_ERROR_VALIDATION_FAILURE`
- `XR_ERROR_RUNTIME_FAILURE`
- `XR_ERROR_HANDLE_INVALID`
- `XR_ERROR_INSTANCE_LOST`
- `XR_ERROR_SESSION_LOST`
- `XR_ERROR_OUT_OF_MEMORY`
- `XR_ERROR_LIMIT_REACHED`

The[XrDeviceAnchorPersistenceCreateInfoANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceCreateInfoANDROID)structure is defined as:  

    typedef struct XrDeviceAnchorPersistenceCreateInfoANDROID {
        XrStructureType    type;
        void*              next;
    } XrDeviceAnchorPersistenceCreateInfoANDROID;

### Member Descriptions

- `type`is the[XrStructureType](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrStructureType)of this structure.
- `next`is`NULL`or a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR or this extension.

The[XrDeviceAnchorPersistenceCreateInfoANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceCreateInfoANDROID)structure provides creation options for the[XrDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceANDROID)when passed to[xrCreateDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrCreateDeviceAnchorPersistenceANDROID).

### Valid Usage (Implicit)

- The[`XR_ANDROID_device_anchor_persistence`](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XR_ANDROID_device_anchor_persistence)extension**must** be enabled prior to using[XrDeviceAnchorPersistenceCreateInfoANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceCreateInfoANDROID)
- `type`**must** be`XR_TYPE_DEVICE_ANCHOR_PERSISTENCE_CREATE_INFO_ANDROID`
- `next`**must** be`NULL`or a valid pointer to the[next structure in a structure chain](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-valid-usage-for-structure-pointer-chains)

The[xrDestroyDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrDestroyDeviceAnchorPersistenceANDROID)function is defined as:  

    XrResult xrDestroyDeviceAnchorPersistenceANDROID(
        XrDeviceAnchorPersistenceANDROID            handle);

### Parameter Descriptions

- `handle`is an[XrDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceANDROID)handle previously created by`xrCreateDeviceAnchorPersistenceANDROID`.

The[xrDestroyDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrDestroyDeviceAnchorPersistenceANDROID)function destroys the device anchor persistence handle.

### Valid Usage (Implicit)

- The[`XR_ANDROID_device_anchor_persistence`](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XR_ANDROID_device_anchor_persistence)extension**must** be enabled prior to calling[xrDestroyDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrDestroyDeviceAnchorPersistenceANDROID)
- `handle`**must** be a valid[XrDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceANDROID)handle

### Thread Safety

- Access to`handle`, and any child handles,**must**be externally synchronized

### Return Codes

[**Success**](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-successcodes)

- `XR_SUCCESS`

[**Failure**](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-errorcodes)

- `XR_ERROR_FUNCTION_UNSUPPORTED`
- `XR_ERROR_HANDLE_INVALID`

## Persist an anchor

The[xrPersistAnchorANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrPersistAnchorANDROID)function is defined as:  

    XrResult xrPersistAnchorANDROID(
        XrDeviceAnchorPersistenceANDROID            handle,
        const XrPersistedAnchorSpaceInfoANDROID*    persistedInfo,
        XrUuidEXT*                                  anchorIdOutput);

### Parameter Descriptions

- `handle`is the[XrDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceANDROID).
- `persistedInfo`is the[XrPersistedAnchorSpaceInfoANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrPersistedAnchorSpaceInfoANDROID)containing parameters for the anchor persistence.
- `anchorIdOutput`is a pointer to an[XrUuidEXT](hhttps://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrUuidEXT)in which the UUID of the persisted anchor is returned.

The application**can** request anchors to be persisted by calling[xrPersistAnchorANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrPersistAnchorANDROID). The application**must** not assume a success return value means the anchor is immediately persisted. The application**should** use[xrGetAnchorPersistStateANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrGetAnchorPersistStateANDROID)to check the persist state of the anchor using the returned anchor[XrUuidEXT](hhttps://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrUuidEXT). The application**can** use[xrUnpersistAnchorANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrUnpersistAnchorANDROID)to unpersist the anchor.

- `XR_ERROR_ANCHOR_NOT_TRACKING_ANDROID`will be returned if the anchor is not being tracked at the time of the call.
- `XR_ERROR_PERSISTED_DATA_NOT_READY_ANDROID`will be returned if the persisted data is not ready.
- `XR_SUCCESS`will be returned once the anchor has been queued for persistence.

### Valid Usage (Implicit)

- The[`XR_ANDROID_device_anchor_persistence`](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XR_ANDROID_device_anchor_persistence)extension**must** be enabled prior to calling[xrPersistAnchorANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrPersistAnchorANDROID)
- `handle`**must** be a valid[XrDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceANDROID)handle
- `persistedInfo`**must** be a pointer to a valid[XrPersistedAnchorSpaceInfoANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrPersistedAnchorSpaceInfoANDROID)structure
- `anchorIdOutput`**must** be a pointer to an[XrUuidEXT](hhttps://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrUuidEXT)structure

### Return Codes

[**Success**](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-successcodes)

- `XR_SUCCESS`
- `XR_SESSION_LOSS_PENDING`

[**Failure**](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-errorcodes)

- `XR_ERROR_ANCHOR_NOT_TRACKING_ANDROID`
- `XR_ERROR_FUNCTION_UNSUPPORTED`
- `XR_ERROR_VALIDATION_FAILURE`
- `XR_ERROR_RUNTIME_FAILURE`
- `XR_ERROR_HANDLE_INVALID`
- `XR_ERROR_INSTANCE_LOST`
- `XR_ERROR_SESSION_LOST`
- `XR_ERROR_OUT_OF_MEMORY`
- `XR_ERROR_LIMIT_REACHED`

The[XrPersistedAnchorSpaceInfoANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrPersistedAnchorSpaceInfoANDROID)structure is defined as:  

    typedef struct XrPersistedAnchorSpaceInfoANDROID {
        XrStructureType    type;
        void*              next;
        XrSpace            anchor;
    } XrPersistedAnchorSpaceInfoANDROID;

### Member Descriptions

- `type`is the[XrStructureType](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrStructureType)of this structure.
- `next`is`NULL`or a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR or this extension.
- `anchor`is an anchor[XrSpace](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrSpace)previously created by[xrCreateAnchorSpaceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_trackables#xrCreateAnchorSpaceANDROID)to persist.

### Valid Usage (Implicit)

- The[`XR_ANDROID_device_anchor_persistence`](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XR_ANDROID_device_anchor_persistence)extension**must** be enabled prior to using[XrPersistedAnchorSpaceInfoANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrPersistedAnchorSpaceInfoANDROID)
- `type`**must** be`XR_TYPE_PERSISTED_ANCHOR_SPACE_INFO_ANDROID`
- `next`**must** be`NULL`or a valid pointer to the[next structure in a structure chain](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-valid-usage-for-structure-pointer-chains)
- `anchor`**must** be a valid[XrSpace](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrSpace)handle

The[xrGetAnchorPersistStateANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrGetAnchorPersistStateANDROID)function is defined as:  

    XrResult xrGetAnchorPersistStateANDROID(
        XrDeviceAnchorPersistenceANDROID            handle,
        const XrUuidEXT*                            anchorId,
        XrAnchorPersistStateANDROID*                persistState);

### Parameter Descriptions

- `handle`is the[XrDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceANDROID).
- `anchorId`is the[XrUuidEXT](hhttps://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrUuidEXT)of the anchor.
- `persistState`is a pointer to an[XrAnchorPersistStateANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrAnchorPersistStateANDROID)in which the state of the anchor is returned.
- `XR_ERROR_ANCHOR_ID_NOT_FOUND_ANDROID`will be returned if the anchor[XrUuidEXT](hhttps://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrUuidEXT)is not found.
- `XR_ERROR_PERSISTED_DATA_NOT_READY_ANDROID`will be returned if the persisted data of`anchorId`is not ready.

### Valid Usage (Implicit)

- The[`XR_ANDROID_device_anchor_persistence`](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XR_ANDROID_device_anchor_persistence)extension**must** be enabled prior to calling[xrGetAnchorPersistStateANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrGetAnchorPersistStateANDROID)
- `handle`**must** be a valid[XrDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceANDROID)handle
- `anchorId`**must** be a pointer to a valid[XrUuidEXT](hhttps://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrUuidEXT)structure
- `persistState`**must** be a pointer to an[XrAnchorPersistStateANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrAnchorPersistStateANDROID)value

### Return Codes

[**Success**](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-successcodes)

- `XR_SUCCESS`
- `XR_SESSION_LOSS_PENDING`

[**Failure**](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-errorcodes)

- `XR_ERROR_FUNCTION_UNSUPPORTED`
- `XR_ERROR_VALIDATION_FAILURE`
- `XR_ERROR_RUNTIME_FAILURE`
- `XR_ERROR_HANDLE_INVALID`
- `XR_ERROR_INSTANCE_LOST`
- `XR_ERROR_SESSION_LOST`
- `XR_ERROR_ANCHOR_ID_NOT_FOUND_ANDROID`

The`XrAnchorPersistStateANDROID`enum is defined as:  

    typedef enum XrAnchorPersistStateANDROID {
        XR_ANCHOR_PERSIST_STATE_PERSIST_NOT_REQUESTED_ANDROID = 0,
        XR_ANCHOR_PERSIST_STATE_PERSIST_PENDING_ANDROID = 1,
        XR_ANCHOR_PERSIST_STATE_PERSISTED_ANDROID = 2
    } XrAnchorPersistStateANDROID;

|---------------------------------------------------------|------------------------------------------------------------------|
| **Enum**                                                | **Description**                                                  |
| `XR_ANCHOR_PERSIST_STATE_PERSIST_NOT_REQUESTED_ANDROID` | Anchor has not been requested to be persisted by the app.        |
| `XR_ANCHOR_PERSIST_STATE_PERSIST_PENDING_ANDROID`       | Anchor has been requested to be persisted but not persisted yet. |
| `XR_ANCHOR_PERSIST_STATE_PERSISTED_ANDROID`             | Anchor has been successfully persisted by the runtime.           |

## Create an anchor from persisted data

The[xrCreatePersistedAnchorSpaceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrCreatePersistedAnchorSpaceANDROID)function is defined as:  

    XrResult xrCreatePersistedAnchorSpaceANDROID(
        XrDeviceAnchorPersistenceANDROID            handle,
        const XrPersistedAnchorSpaceCreateInfoANDROID* createInfo,
        XrSpace*                                    anchorOutput);

### Parameter Descriptions

- `handle`is the[XrDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceANDROID).
- `createInfo`is the[XrPersistedAnchorSpaceCreateInfoANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrPersistedAnchorSpaceCreateInfoANDROID)containing parameters for the anchor creation.
- `anchorOutput`is a pointer to an[XrSpace](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrSpace)in which the new anchor space is returned.

The application**can** create an[XrSpace](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrSpace)anchor from a previously persisted anchor by calling[xrCreatePersistedAnchorSpaceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrCreatePersistedAnchorSpaceANDROID)with the same[XrUuidEXT](hhttps://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrUuidEXT). This is another way of creating anchors as defined in[`XR_ANDROID_trackables`](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_trackables).

- `XR_ERROR_ANCHOR_ID_NOT_FOUND_ANDROID`will be returned if the anchor[XrUuidEXT](hhttps://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrUuidEXT)is not found.

### Valid Usage (Implicit)

- The[`XR_ANDROID_device_anchor_persistence`](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XR_ANDROID_device_anchor_persistence)extension**must** be enabled prior to calling[xrCreatePersistedAnchorSpaceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrCreatePersistedAnchorSpaceANDROID)
- `handle`**must** be a valid[XrDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceANDROID)handle
- `createInfo`**must** be a pointer to a valid[XrPersistedAnchorSpaceCreateInfoANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrPersistedAnchorSpaceCreateInfoANDROID)structure
- `anchorOutput`**must** be a pointer to an[XrSpace](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrSpace)handle

### Return Codes

[**Success**](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-successcodes)

- `XR_SUCCESS`
- `XR_SESSION_LOSS_PENDING`

[**Failure**](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-errorcodes)

- `XR_ERROR_FUNCTION_UNSUPPORTED`
- `XR_ERROR_VALIDATION_FAILURE`
- `XR_ERROR_RUNTIME_FAILURE`
- `XR_ERROR_HANDLE_INVALID`
- `XR_ERROR_INSTANCE_LOST`
- `XR_ERROR_SESSION_LOST`
- `XR_ERROR_OUT_OF_MEMORY`
- `XR_ERROR_LIMIT_REACHED`
- `XR_ERROR_ANCHOR_ID_NOT_FOUND_ANDROID`
- `XR_ERROR_PERSISTED_DATA_NOT_READY_ANDROID`

The[XrPersistedAnchorSpaceCreateInfoANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrPersistedAnchorSpaceCreateInfoANDROID)structure is defined as:  

    typedef struct XrPersistedAnchorSpaceCreateInfoANDROID {
        XrStructureType    type;
        void*              next;
        XrUuidEXT          anchorId;
    } XrPersistedAnchorSpaceCreateInfoANDROID;

### Member Descriptions

- `type`is the[XrStructureType](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrStructureType)of this structure.
- `next`is`NULL`or a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR or this extension.
- `anchorId`is the[XrUuidEXT](hhttps://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrUuidEXT)of the persisted anchor to create an anchor[XrSpace](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrSpace)from.

The[XrPersistedAnchorSpaceCreateInfoANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrPersistedAnchorSpaceCreateInfoANDROID)structure provides creation options for the anchor when passed to[xrCreateDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrCreateDeviceAnchorPersistenceANDROID).

### Valid Usage (Implicit)

- The[`XR_ANDROID_device_anchor_persistence`](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XR_ANDROID_device_anchor_persistence)extension**must** be enabled prior to using[XrPersistedAnchorSpaceCreateInfoANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrPersistedAnchorSpaceCreateInfoANDROID)
- `type`**must** be`XR_TYPE_PERSISTED_ANCHOR_SPACE_CREATE_INFO_ANDROID`
- `next`**must** be`NULL`or a valid pointer to the[next structure in a structure chain](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-valid-usage-for-structure-pointer-chains)

## Enumerate persisted anchors

The[xrEnumeratePersistedAnchorsANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrEnumeratePersistedAnchorsANDROID)function is defined as:  

    XrResult xrEnumeratePersistedAnchorsANDROID(
        XrDeviceAnchorPersistenceANDROID            handle,
        uint32_t                                    anchorIdsCapacityInput,
        uint32_t*                                   anchorIdsCountOutput,
        XrUuidEXT*                                  anchorIds);

### Parameter Descriptions

- `handle`is the[XrDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceANDROID).
- `anchorIdsCapacityInput`is the capacity of the`anchorIds`array, or 0 to indicate a request to retrieve the required capacity.
- `anchorIdsCountOutput`is a pointer to the count of`anchorIds`written, or a pointer to the required capacity in the case that`anchorIdsCapacityInput`is insufficient.
- `anchorIds`is a pointer to an array of[XrUuidEXT](hhttps://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrUuidEXT)structures. It**can** be`NULL`if`anchorIdsCapacityInput`is 0.
- See the[Buffer Size Parameters](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-buffer-size-parameters)section for a detailed description of retrieving the required`anchorIds`size.

The application**may** enumerate all current persisted anchors by calling[xrEnumeratePersistedAnchorsANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrEnumeratePersistedAnchorsANDROID).`anchorIds`will hold the UUIDs of the persisted anchors up to the capacity of the array. If the capacity is insufficient, applications have no guarantees about which anchors are returned.

### Valid Usage (Implicit)

- The[`XR_ANDROID_device_anchor_persistence`](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XR_ANDROID_device_anchor_persistence)extension**must** be enabled prior to calling[xrEnumeratePersistedAnchorsANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrEnumeratePersistedAnchorsANDROID)
- `handle`**must** be a valid[XrDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceANDROID)handle
- `anchorIdsCountOutput`**must** be a pointer to a`uint32_t`value
- If`anchorIdsCapacityInput`is not`0, anchorIds`**must** be a pointer to an array of`anchorIdsCapacityInput`[XrUuidEXT](hhttps://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrUuidEXT)structures

### Return Codes

[**Success**](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-successcodes)

- `XR_SUCCESS`
- `XR_SESSION_LOSS_PENDING`

[**Failure**](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-errorcodes)

- `XR_ERROR_PERSISTED_DATA_NOT_READY_ANDROID`
- `XR_ERROR_FUNCTION_UNSUPPORTED`
- `XR_ERROR_VALIDATION_FAILURE`
- `XR_ERROR_RUNTIME_FAILURE`
- `XR_ERROR_HANDLE_INVALID`
- `XR_ERROR_INSTANCE_LOST`
- `XR_ERROR_SESSION_LOST`
- `XR_ERROR_SIZE_INSUFFICIENT`

## Unpersist a persisted anchor

The[xrUnpersistAnchorANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrUnpersistAnchorANDROID)function is defined as:  

    XrResult xrUnpersistAnchorANDROID(
        XrDeviceAnchorPersistenceANDROID            handle,
        const XrUuidEXT*                            anchorId);

### Parameter Descriptions

- `handle`is the[XrDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceANDROID).
- `anchorId`is the[XrUuidEXT](hhttps://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrUuidEXT)of the anchor to unpersist.

The application**may** unpersist a persisted anchor by calling[xrUnpersistAnchorANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrUnpersistAnchorANDROID)and passing the anchor[XrUuidEXT](hhttps://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrUuidEXT)of the anchor to unpersist.

- `XR_ERROR_PERSISTED_DATA_NOT_READY_ANDROID`will be returned if the persisted data is not ready.
- `XR_ERROR_ANCHOR_ID_NOT_FOUND_ANDROID`will be returned if the anchor[XrUuidEXT](hhttps://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrUuidEXT)is not found.

### Valid Usage (Implicit)

- The[`XR_ANDROID_device_anchor_persistence`](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XR_ANDROID_device_anchor_persistence)extension**must** be enabled prior to calling[xrUnpersistAnchorANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrUnpersistAnchorANDROID)
- `handle`**must** be a valid[XrDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceANDROID)handle
- `anchorId`**must** be a pointer to a valid[XrUuidEXT](hhttps://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrUuidEXT)structure

### Return Codes

[**Success**](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-successcodes)

- `XR_SUCCESS`
- `XR_SESSION_LOSS_PENDING`

[**Failure**](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-errorcodes)

- `XR_ERROR_FUNCTION_UNSUPPORTED`
- `XR_ERROR_VALIDATION_FAILURE`
- `XR_ERROR_RUNTIME_FAILURE`
- `XR_ERROR_HANDLE_INVALID`
- `XR_ERROR_INSTANCE_LOST`
- `XR_ERROR_SESSION_LOST`
- `XR_ERROR_OUT_OF_MEMORY`
- `XR_ERROR_LIMIT_REACHED`
- `XR_ERROR_ANCHOR_ID_NOT_FOUND_ANDROID`
- `XR_ERROR_PERSISTED_DATA_NOT_READY_ANDROID`

## Example code for anchor persistence

The following example code demonstrates how to inspect system capability, persist, enumerate and unpersist anchors, as well as creating an anchor from persisted anchor[XrUuidEXT](hhttps://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrUuidEXT).  

    XrSession session; // previously initialized
    XrSpace anchor; // previously initialized

    // The function pointers are previously initialized using xrGetInstanceProcAddr.
    PFN_xrEnumerateSupportedPersistenceAnchorTypesANDROID xrEnumerateSupportedPersistenceAnchorTypesANDROID; // previously initialized
    PFN_xrCreateDeviceAnchorPersistenceANDROID xrCreateDeviceAnchorPersistenceANDROID; // previously initialized
    PFN_xrDestroyDeviceAnchorPersistenceANDROID xrDestroyDeviceAnchorPersistenceANDROID; // previously initialized
    PFN_xrPersistAnchorANDROID xrPersistAnchorANDROID; // previously initialized
    PFN_xrGetAnchorPersistStateANDROID xrGetAnchorPersistStateANDROID; // previously initialized
    PFN_xrCreatePersistedAnchorSpaceANDROID xrCreatePersistedAnchorSpaceANDROID; // previously initialized
    PFN_xrEnumeratePersistedAnchorsANDROID xrEnumeratePersistedAnchorsANDROID; // previously initialized
    PFN_xrUnpersistAnchorANDROID xrUnpersistAnchorANDROID; // previously initialized

    // Create a device anchor persistence handle
    XrDeviceAnchorPersistenceCreateInfoANDROID persistenceHandleCreateInfo;
    persistenceHandleCreateInfo.type = XR_TYPE_DEVICE_ANCHOR_PERSISTENCE_CREATE_INFO_ANDROID;
    persistenceHandleCreateInfo.next = nullptr;

    XrDeviceAnchorPersistenceANDROID persistenceHandle;
    CHK_XR(xrCreateDeviceAnchorPersistenceANDROID(session, &persistenceHandleCreateInfo, &persistenceHandle));

    /// Persist an anchor
    XrPersistedAnchorSpaceInfo anchorSpaceInfo;
    anchorSpaceInfo.type = XR_TYPE_PERSISTED_ANCHOR_SPACE_INFO_ANDROID;
    anchorSpaceInfo.next = nullptr;
    anchorSpaceInfo.anchor = anchor;

    XrUuidEXT anchorId;
    do {
      XrResult result = xrPersistAnchorANDROID(
        persistenceHandle, &anchorSpaceInfo, &anchorId);
    } while (result == XR_ERROR_PERSISTED_DATA_NOT_READY_ANDROID ||
             result == XR_ERROR_ANCHOR_NOT_TRACKING_ANDROID);
    if (result != XR_SUCCESS) {
      // Handle errors
    }


    // ... Update loop ...
    // Poll for anchor persist state to confirm if it was successfully persisted
    XrAnchorPersistStateANDROID persistState;
    CHK_XR(xrGetAnchorPersistStateANDROID(persistenceHandle, &anchorId, &persistState));
    if (persistState == XR_ANCHOR_PERSIST_STATE_PERSISTED_ANDROID)  {
      // The anchor was persisted successfully
    }

    // Enumerate all persisted anchors
    uint32_t anchorCountOutput = 0;
    std::vector<XrUuidEXT> allAnchors;

    CHK_XR(xrEnumeratePersistedAnchorsANDROID(
      persistenceHandle,
      anchorCountOutput,
      &anchorCountOutput,
      nullptr
    ));
    allAnchors.resize(anchorCountOutput, XR_NULL_HANDLE);

    // Fetch the actual anchors in an appropriately resized array.
    CHK_XR(xrEnumeratePersistedAnchorsANDROID(
      persistenceHandle,
      anchorCountOutput,
      &anchorCountOutput,
      allAnchors.data()
    ));

    // Creating an anchor from a previously persisted anchor using its UUID
    XrTime updateTime; // Time used for the current frame's simulation update.
    XrUuidEXT anchorId = allAnchors[0];

    XrPersistedAnchorSpaceCreateInfo createInfo;
    createInfo.type = XR_TYPE_PERSISTED_ANCHOR_CREATE_INFO_ANDROID;
    createInfo.next = nullptr;
    createInfo.anchorId = anchorId;

    XrSpace anchorSpace = XR_NULL_HANDLE;
    CHK_XR(xrCreatePersistedAnchorSpaceANDROID(
      persistenceHandle,
      &createInfo,
      &anchorSpace
    ));

    // The anchor was found and retrieved from the local device successfully.
    XrSpaceLocation anchorLocation = { XR_TYPE_SPACE_LOCATION };
    CHK_XR(xrLocateSpace(anchorSpace, appSpace, updateTime, &anchorLocation));
    XrPosef pose = anchorLocation.pose;

    // Unpersist the anchor
    do {
      XrResult result = xrUnpersistAnchorANDROID(persistenceHandle, &anchorId);
    } while (result == XR_ERROR_PERSISTED_DATA_NOT_READY_ANDROID);
    if (result != XR_SUCCESS) {
      // Handle errors
    }

    // Once app is done with all persistence related tasks
    CHK_XR(xrDestroySpace(anchorSpace));
    CHK_XR(xrDestroyDeviceAnchorPersistenceANDROID(persistenceHandle));

**New Object Types**

- [XrDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceANDROID)

**New Enum Constants**

[XrObjectType](hhttps://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrObjectType)enumeration is extended with:

- `XR_OBJECT_TYPE_DEVICE_ANCHOR_PERSISTENCE_ANDROID`

[XrResult](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrResult)enumeration is extended with:

- `XR_ERROR_ANCHOR_ID_NOT_FOUND_ANDROID`
- `XR_ERROR_ANCHOR_ALREADY_PERSISTED_ANDROID`
- `XR_ERROR_ANCHOR_NOT_TRACKING_ANDROID`
- `XR_ERROR_PERSISTED_DATA_NOT_READY_ANDROID`

[XrStructureType](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrStructureType)enumeration is extended with:

- `XR_TYPE_PERSISTED_ANCHOR_ANDROID`
- `XR_TYPE_PERSISTED_ANCHOR_SPACE_CREATE_INFO_ANDROID`
- `XR_TYPE_PERSISTED_ANCHOR_SPACE_INFO_ANDROID`
- `XR_TYPE_DEVICE_ANCHOR_PERSISTENCE_CREATE_INFO_ANDROID`

**New Enums**

- [XrAnchorPersistStateANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrAnchorPersistStateANDROID)

**New Structures**

- [XrDeviceAnchorPersistenceCreateInfoANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrDeviceAnchorPersistenceCreateInfoANDROID)
- [XrPersistedAnchorSpaceCreateInfoANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrPersistedAnchorSpaceCreateInfoANDROID)
- [XrPersistedAnchorSpaceInfoANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrPersistedAnchorSpaceInfoANDROID)
- [XrSystemDeviceAnchorPersistencePropertiesANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#XrSystemDeviceAnchorPersistencePropertiesANDROID)

**New Functions**

- [xrEnumerateSupportedPersistenceAnchorTypesANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrEnumerateSupportedPersistenceAnchorTypesANDROID)
- [xrCreateDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrCreateDeviceAnchorPersistenceANDROID)
- [xrDestroyDeviceAnchorPersistenceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrDestroyDeviceAnchorPersistenceANDROID)
- [xrPersistAnchorANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrPersistAnchorANDROID)
- [xrGetAnchorPersistStateANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrGetAnchorPersistStateANDROID)
- [xrCreatePersistedAnchorSpaceANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrCreatePersistedAnchorSpaceANDROID)
- [xrEnumeratePersistedAnchorsANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrEnumeratePersistedAnchorsANDROID)
- [xrUnpersistAnchorANDROID](https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_device_anchor_persistence#xrUnpersistAnchorANDROID)

**Issues**

**Version History**

- Revision 1, 2024-10-10 (Kenny Vercaemer)
  - Initial extension description

*** ** * ** ***

OpenXR™ and the OpenXR logo are trademarks owned by The Khronos Group Inc. and are registered as a trademark in China, the European Union, Japan and the United Kingdom.