Stay organized with collections Save and categorize content based on your preferences.
public static final enum Config.GeospatialMode

Describes the desired behavior of the ARCore Geospatial API. The Geospatial API uses a combination of Google's Visual Positioning System (VPS) and GPS to determine the geospatial pose.

The Geospatial API is able to provide the best user experience when it is able to generate high accuracy poses. However, the Geospatial API can be used anywhere, as long as the device is able to determine its location, even if the available location information has low accuracy.

  • In areas with VPS coverage, the Geospatial API is able to generate high accuracy poses. This can work even where GPS accuracy is low, such as dense urban environments. Under typical conditions, VPS can be expected to provide positional accuracy typically better than 5 meters and often around 1 meter, and a rotational accuracy of better than 5 degrees. Use Session.checkVpsAvailabilityAsync(double, double, Consumer) to determine if a given location has VPS coverage.
  • In outdoor environments with few or no overhead obstructions, GPS may be sufficient to generate high accuracy poses. GPS accuracy may be low in dense urban environments and indoors.

A small number of ARCore supported devices do not support the Geospatial API. Use Session.isGeospatialModeSupported(Config.GeospatialMode) to determine if the current device is supported. Affected devices are also indicated on the ARCore supported devices page.

The default value is DISABLED. Use Config.setGeospatialMode(Config.GeospatialMode) to set the desired mode.

Inherited Methods

Enum Values


public static final Config.GeospatialMode DISABLED

The Geospatial API is disabled. When a configuration with DISABLED becomes active on the Session, current Earth and Anchor objects created from Earth.createAnchor(double, double, double, float, float, float, float) will stop updating; have their TrackingState set to TrackingState.STOPPED; and Session.getEarth() will return null. If re-enabled, you will need to call Session.getEarth() again to obtain a new Earth object.


public static final Config.GeospatialMode ENABLED

The Geospatial API is enabled. Session.getEarth() will return valid Earth objects when a configuration becomes active with this mode through Session.configure(Config).

Using this mode requires your app do the following:

Location is tracked only while the Session is resumed. While the Session is paused, Earth's TrackingState will be TrackingState.PAUSED.

For more information, see documentation on the Geospatial API on Google Developers.

This mode is not compatible with the front-facing (selfie) camera. If Config.GeospatialMode is ENABLED on a session using the front-facing (selfie) camera, Session.configure(Config) will throw UnsupportedConfigurationException.

Not all devices support ENABLED, use Session.isGeospatialModeSupported(Config.GeospatialMode) to check if the current device and selected camera support enabling this mode. These checks are done in the call to Session.configure(Config).