androidx.xr.arcore.guava


Extension functions summary

ListenableFuture<VpsAvailabilityResult>
Geospatial.checkVpsAvailabilityAsync(
    session: Session,
    latitude: Double,
    longitude: Double
)

Gets the availability of the Visual Positioning System (VPS) at a specified horizontal position.

ListenableFuture<UUID>

Stores this anchor in the application's local storage so that it can be shared across sessions.

Extension functions

Geospatial.checkVpsAvailabilityAsync

fun Geospatial.checkVpsAvailabilityAsync(
    session: Session,
    latitude: Double,
    longitude: Double
): ListenableFuture<VpsAvailabilityResult>

Gets the availability of the Visual Positioning System (VPS) at a specified horizontal position.

The availability of VPS in a given location helps to improve the quality of Geospatial localization and tracking accuracy.

This launches an asynchronous operation used to query the Google Cloud ARCore API. It may be called without calling Session.configure.

Your app must be properly set up to communicate with the Google Cloud ARCore API in order to obtain a result from this call, otherwise the result will be VpsAvailabilityNotAuthorized.

Parameters
session: Session

the current Session

latitude: Double

the latitude in degrees

longitude: Double

the longitude in degrees

Anchor.persistAsync

fun Anchor.persistAsync(session: Session): ListenableFuture<UUID>

Stores this anchor in the application's local storage so that it can be shared across sessions.

Parameters
session: Session

the Session to use for the coroutine context

Returns
ListenableFuture<UUID>

a ListenableFuture that returns a UUID that uniquely identifies this anchor

Throws
IllegalStateException

if Session.config is set to Config.AnchorPersistenceMode.DISABLED, or if there was an unexpected error persisting the anchor (e.g. ran out of memory)