Skip to Content
Android OptionsVPS and AR Content

VPS and AR content

Both session modes use VPS. Prepare mapped venues and AR content in Graffity Console.

Use GraffityARMode.ARContent to begin localization when the hosted surface starts, without a destination picker:

import android.content.Context import tech.graffity.android.arcloud.publicapi.* fun makeContentExperience(context: Context, accessToken: String): GraffityARCloudSDK = GraffityARCloudSDK( context, GraffityARCloudConfiguration.Builder(accessToken) .mode(GraffityARMode.ARContent) .build() )

Use Navigation for destination-first guidance. That mode starts localization after a destination selection.

Localization state

Observe state.vpsState, stateFlow, stateStream(), or the listener’s onLocalized callback:

StateMeaning
IdleNot yet localizing.
AwaitingInitialWaiting for the initial level camera view.
Guiding(progress)Capture guidance; progress is a hold fraction in 0–1.
Localized(sectionId)Successfully localized section.
Failed(error)Localization failed. Inspect the associated error and state.lastError.

Follow camera guidance in the mapped area. onLocalized fires on initial localization and when localization moves into a different section. Use vpsState to identify the section explicitly.

The SDK fetches and renders content for that section. Hosts author content in Console and react to public callbacks; the external API does not expose renderer nodes, raw point clouds, or solver settings.

Optional guidance callbacks

onActiveLocGuidanceUpdated(sdk, targetWorldPose, progress) supplies a nullable column-major 4×4 target camera-to-world pose (16 floats) and the hold fraction. onActiveLocInliers(sdk, inliers, iteration) supplies server diagnostics. These callbacks are optional; the SDK provides built-in guidance.

See listener signatures, state and lifecycle, and errors.