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.
Once the ARCore API is enabled, you can check VPS availability without:
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 Session.checkVpsAvailabilityAsync() to obtain a VpsAvailabilityFuture, an asynchronous task that checks the VPS availability at a given horizontal position.
Once you have the VpsAvailabilityFuture, you can obtain its result by polling or through a callback.
Poll the result
Use Future.getState() to obtain the state of the Future. There are three different states:
PENDING: The operation is not yet complete, so no result is known.
CANCELLED: The operation has been cancelled by Future.cancel(). Any registered callback will never be called.
You can also obtain the result of a Future through a callback. Use Session.checkVpsAvailabilityAsync() and supply a callback. This callback will be called on the Main thread soon after the Future has state DONE.
Use Future.cancel() to attempt to cancel the Future. Due to thread parallelism, it may be possible that your cancel attempt does not actually succeed.
Future.cancel() returns true if this attempt was successful, and false otherwise.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-14 UTC."],[[["\u003cp\u003eThe Geospatial API leverages VPS and GPS data to create precise AR experiences, adapting to environments with varying location accuracy.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can proactively check VPS availability before initiating AR sessions, enabling context-aware features like conditional AR activation buttons.\u003c/p\u003e\n"],["\u003cp\u003eThe API offers flexible methods for obtaining VPS availability results, including polling and callbacks, accommodating different development approaches.\u003c/p\u003e\n"],["\u003cp\u003eEven without VPS coverage, the Geospatial API can function in outdoor settings with clear GPS signals, ensuring broader usability.\u003c/p\u003e\n"],["\u003cp\u003eAfter confirming VPS availability or suitable GPS conditions, developers can proceed to obtain the device's Geospatial pose and build immersive AR experiences grounded in real-world locations.\u003c/p\u003e\n"]]],[],null,["\u003cbr /\u003e\n\nThe Geospatial API uses a combination of [VPS](/ar/develop/geospatial#global_localization_with_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:\n\n- 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.\n- 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.\n\nYou 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.\n\nEnable the ARCore API\n\nYour app must enable the [ARCore API](/ar/develop/java/geospatial/enable#enable_the_arcore_api) to check VPS availability.\n\nOnce the ARCore API is enabled, you can check VPS availability without:\n\n- A current running [`Session`](/ar/reference/java/com/google/ar/core/Session) (before calling [`Session.resume()`](/ar/reference/java/com/google/ar/core/Session#resume-)).\n- Setting a [`GeospatialMode`](/ar/reference/java/com/google/ar/core/Config.GeospatialMode).\n\nCheck VPS availability in your app\n\nThe 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 [`Session.checkVpsAvailabilityAsync()`](/ar/reference/java/com/google/ar/core/Session#checkVpsAvailabilityAsync-latitude-longitude-callback) to obtain a [`VpsAvailabilityFuture`](/ar/reference/java/com/google/ar/core/VpsAvailabilityFuture), an asynchronous task that checks the VPS availability at a given horizontal position.\n\nOnce you have the [`VpsAvailabilityFuture`](/ar/reference/java/com/google/ar/core/VpsAvailabilityFuture), you can obtain its result by polling or through a callback.\n\n\nPoll the result\n\nUse [`Future.getState()`](/ar/reference/java/com/google/ar/core/Future#getState-) to obtain the state of the `Future`. There are three different states:\n\n- [`PENDING`](/ar/reference/java/com/google/ar/core/FutureState#done): The operation is not yet complete, so no result is known.\n- [`CANCELLED`](/ar/reference/java/com/google/ar/core/FutureState#done): The operation has been cancelled by [`Future.cancel()`](/ar/reference/java/com/google/ar/core/Future#cancel-). Any registered callback will never be called.\n- [`DONE`](/ar/reference/java/com/google/ar/core/FutureState#done): The operation is complete. Use [`VpsAvailabilityFuture.getResult()`](/ar/reference/java/com/google/ar/core/VpsAvailabilityFuture#getResult()) to obtain the result.\n\nYou may continue checking [`Future.getState()`](/ar/reference/java/com/google/ar/core/Future#getState-) until the task is complete. \n\nJava \n\n```java\n// Obtain a VpsAvailabilityFuture and store it somewhere.\nVpsAvailabilityFuture future = session.checkVpsAvailabilityAsync(latitude, longitude, null);\n\n// Poll VpsAvailabilityFuture later, for example, in a render loop.\nif (future.getState() == FutureState.DONE) {\n switch (future.getResult()) {\n case AVAILABLE:\n // VPS is available at this location.\n break;\n case UNAVAILABLE:\n // VPS is unavailable at this location.\n break;\n case ERROR_NETWORK_CONNECTION:\n // The external service could not be reached due to a network connection error.\n break;\n\n // Handle other error states, e.g. ERROR_RESOURCE_EXHAUSTED, ERROR_INTERNAL, ...\n }\n}\n```\n\nKotlin \n\n```kotlin\n// Obtain a VpsAvailabilityFuture and store it somewhere.\nval future = session.checkVpsAvailabilityAsync(latitude, longitude, null)\n\n// Poll VpsAvailabilityFuture later, for example, in a render loop.\nif (future.state == FutureState.DONE) {\n when (future.result) {\n VpsAvailability.AVAILABLE -\u003e {\n // VPS is available at this location.\n }\n VpsAvailability.UNAVAILABLE -\u003e {\n // VPS is unavailable at this location.\n }\n VpsAvailability.ERROR_NETWORK_CONNECTION -\u003e {\n // The external service could not be reached due to a network connection error.\n }\n else -\u003e {\n TODO(\"Handle other error states, e.g. ERROR_RESOURCE_EXHAUSTED, ERROR_INTERNAL, ...\")\n }\n }\n}\n```\n\nObtain the result through a callback\n\nYou can also obtain the result of a `Future` through a callback. Use [`Session.checkVpsAvailabilityAsync()`](/ar/reference/java/com/google/ar/core/Session#checkVpsAvailabilityAsync-latitude-longitude-callback) and supply a `callback`. This `callback` will be called on the Main thread soon after the `Future` has state [`DONE`](/ar/reference/java/com/google/ar/core/FutureState#done). \n\nJava \n\n```java\nsession.checkVpsAvailabilityAsync(\n latitude,\n longitude,\n result -\u003e {\n // Callback is called on the Main thread.\n switch (result) {\n // Handle the VpsAvailability result as shown above.\n // For example, show UI that enables your AR view.\n }\n });\n```\n\nKotlin \n\n```kotlin\nsession.checkVpsAvailabilityAsync(latitude, longitude) { result -\u003e\n // Callback is called on the Main thread.\n\n // Handle the VpsAvailability result as shown above.\n // For example, show UI that enables your AR view.\n TODO(\"Handle VpsAvailability \" + result)\n}\n```\n\nCancel the `Future`\n\nUse [`Future.cancel()`](/ar/reference/java/com/google/ar/core/Future#cancel-) to attempt to cancel the `Future`. Due to thread parallelism, it may be possible that your cancel attempt does not actually succeed.\n\n`Future.cancel()` returns `true` if this attempt was successful, and `false` otherwise.\n\nUse the Geospatial API without VPS coverage\n\nThe 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.\n\nWhat's next\n\n- [Obtain the device camera's Geospatial pose](/ar/develop/java/geospatial/obtain-device-pose) to determine the exact location of the user's device in the real world."]]