Check VPS availability at the device's current location

Stay organized with collections Save and categorize content based on your preferences.

The Geospatial API uses a combination of VPS and GPS data to generate high-accuracy Geospatial poses. The API can be used in any place where the device is able to determine its location:

  • In areas with low GPS accuracy, such as indoor spaces and dense urban environments, the API will rely on VPS coverage to generate high-accuracy poses.
  • In outdoor environments with few or no overhead obstructions, the Geospatial API may be able to use available GPS location data to generate Geospatial poses with high accuracy.

You can determine VPS availability at a given horizontal position before the AR session starts and use it to create more specific experiences — for example, to present an "Enter AR" button only when VPS is available.

Enable the ARCore API

Your app must enable the ARCore API to check VPS availability.

Check VPS availability in your app

The Geospatial API can be used in any place where the device is able to determine its location. If your AR experience hinges on VPS coverage, you can use AREarthManager.CheckVpsAvailability() to obtain a VpsAvailabilityPromise, an asynchronous task that checks the VPS availability at a given horizontal position. Once you have the VpsAvailabilityPromise, you can obtain its result by polling.

Poll the result

Use VpsAvailabilityPromise.State to obtain the state of the VpsAvailabilityPromise. There are three different states:

You may continue checking VpsAvailabilityPromise.State and VpsAvailabilityPromise.Result until the task is complete.

Cancel the VpsAvailabilityPromise

Use VpsAvailabilityPromise.Cancel() to attempt to cancel the VpsAvailabilityPromise. Due to thread parallelism, it may be possible that your cancel attempt will not go through.

Use the Geospatial API without VPS coverage

The Geospatial API can also be used in areas that do not have VPS coverage. In outdoor environments with few or no overhead obstructions, GPS may be sufficient to generate a pose with high accuracy.

What's next