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

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.

Returns
ListenableFuture<VpsAvailabilityResult>

the result of the VPS availability check.

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

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

Returns
ListenableFuture<UUID>

a ListenableFuture that returns a UUID that uniquely identifies this anchor.

Throws
kotlin.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).