Config.GeospatialMode

public static final enum Config.GeospatialMode

Describes the desired behavior of ARCore Geospatial API features and capabilities. Not all devices support all modes. Use Session.isGeospatialModeSupported(Config.GeospatialMode) to find whether the current device supports a particular Geospatial mode. The default value is DISABLED.

Use Config.setGeospatialMode(Config.GeospatialMode) to set the desired mode.

Inherited Methods

Enum Values

DISABLED

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.

ENABLED

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