State and navigation values
Public state types are data classes with read-only properties, or sealed state cases, in tech.graffity.android.arcloud.publicapi.
GraffityARState
| Property | Type | Meaning |
|---|---|---|
isSceneReady | Boolean | In 5.0.2, the state bridge derives this from successful VPS localization; it is not an independent camera-ready signal. |
vpsState | GraffityARVPSState | Localization status. |
navigation | GraffityARNavigationState? | Current route state or null. |
lastError | GraffityARCloudError? | Most recent surfaced session error, if any. |
Constructor: GraffityARState(isSceneReady, vpsState, navigation, lastError), with the types above and no defaults.
GraffityARVPSState
| Case | Associated value / meaning |
|---|---|
Idle | Not localizing. |
AwaitingInitial | Waiting for an initial level view. |
Guiding(progress: Double) | Hold/capture guidance fraction in 0–1. |
Localized(sectionId: String) | Successfully localized section. |
Failed(error: GraffityARCloudError) | Localization failure. |
The current bridge maps a failed VPS state to VpsAllAttemptsFailed. Check lastError and onError for more specific operation errors.
GraffityARNavigationState
| Property | Type | Meaning |
|---|---|---|
destinationId | String | Final destination, including while walking toward a transition. |
destinationName | String | Final destination display name. |
action | GraffityARNavigationAction | Current leg’s next instruction. |
distanceToDestinationMeters | Double | Distance to this leg’s target; can be a transition POI. |
distanceToNextActionMeters | Double? | Distance to the next instruction when available. |
Constructor: GraffityARNavigationState(destinationId, destinationName, action, distanceToDestinationMeters, distanceToNextActionMeters), with no defaults.
ARRIVING can indicate a transition during a journey. Use onNavigationArrived for final arrival.
GraffityARNavigationAction
Enum cases: FORWARD, TURN_LEFT, TURN_RIGHT, GO_UP, GO_DOWN, and ARRIVING.