AI-generated Key Takeaways
-
Earth.EarthState describes the current state of Earth and can indicate why Earth.getTrackingState() isn't TrackingState.TRACKING.
-
The state is obtained using Earth.getEarthState().
-
Enum values such as ENABLED, ERROR_APK_VERSION_TOO_OLD, ERROR_GEOSPATIAL_MODE_DISABLED, ERROR_INTERNAL, ERROR_NOT_AUTHORIZED, and ERROR_RESOURCE_EXHAUSTED indicate specific states or issues.
-
ERROR_NOT_AUTHORIZED can occur due to invalid authorization details, such as an invalid API key or mismatched package name and signing key.
-
ERROR_RESOURCE_EXHAUSTED means the application has used up its allocated quota for the ARCore API in the Google Cloud project.
public static final enum
Earth.EarthState
Describes the current state of Earth. When Earth.getTrackingState() does not
become TrackingState.TRACKING, Earth.EarthState may contain the cause of this
failure.
Obtain using Earth.getEarthState().
Inherited Methods
Enum Values
public static final Earth.EarthState ENABLED
ENABLED
public static final Earth.EarthState ENABLED
Earth is enabled, and has not encountered any problems. Check Earth.getTrackingState() to determine if it can be used.
public static final Earth.EarthState ERROR_APK_VERSION_TOO_OLD
ERROR_APK_VERSION_TOO_OLD
public static final Earth.EarthState ERROR_APK_VERSION_TOO_OLD
The APK is older than the current supported version.
public static final Earth.EarthState ERROR_GEOSPATIAL_MODE_DISABLED
ERROR_GEOSPATIAL_MODE_DISABLED
public static final Earth.EarthState ERROR_GEOSPATIAL_MODE_DISABLED
The given Earth is no longer valid and has TrackingState TrackingState.STOPPED due to Config.GeospatialMode.DISABLED being set on the Session.
public static final Earth.EarthState ERROR_INTERNAL
ERROR_INTERNAL
public static final Earth.EarthState ERROR_INTERNAL
Earth localization has encountered an internal error. The app should not attempt to recover from this error. Please see the Android logs for additional information.
public static final Earth.EarthState ERROR_NOT_AUTHORIZED
ERROR_NOT_AUTHORIZED
public static final Earth.EarthState ERROR_NOT_AUTHORIZED
The authorization provided by the application is not valid.
- The associated Google Cloud project may not have enabled the ARCore API.
- When using API key authentication, this will happen if the API key in the manifest is invalid or unauthorized. It may also fail if the API key is restricted to a set of apps not including the current one.
- When using keyless authentication, this may happen when no OAuth client has been created, or when the signing key and package name combination does not match the values used in the Google Cloud project. It may also fail if Google Play Services isn't installed, is too old, or is malfunctioning for some reason (e.g. killed due to memory pressure).
public static final Earth.EarthState ERROR_RESOURCE_EXHAUSTED
ERROR_RESOURCE_EXHAUSTED
public static final Earth.EarthState ERROR_RESOURCE_EXHAUSTED
The application has exhausted the quota allotted to the given Google Cloud project. The developer should request additional quota for the ARCore API for their project from the Google Cloud Console.