ARDK for Android/com.nianticlabs.ardk/AnchorTrackingStateReason
AnchorTrackingStateReason
[androidJvm]
enum AnchorTrackingStateReason : Enum<AnchorTrackingStateReason>
Provides additional context about why an anchor is in a particular tracking state.
When an anchor is not tracked or has limited tracking, this enum provides specific reasons that can help developers understand and respond to tracking issues.
Overview
Tracking state reasons help diagnose why tracking may be failing or limited, enabling applications to provide appropriate user feedback or take corrective actions.
Example
val update = vpsSession.getAnchorUpdate(anchorId)
when (update.trackingStateReason) {
AnchorTrackingStateReason.INITIALIZING ->
println("Anchor is still initializing - tracking will improve")
AnchorTrackingStateReason.PERMISSION_DENIED ->
println("Tracking failed due to permission issues")
AnchorTrackingStateReason.FATAL_NETWORK_ERROR ->
println("Network error preventing tracking")
else ->
println("Other tracking issue: ${update.trackingStateReason}")
}
Entries
| NONE | [androidJvm] NONE No specific reason for the current tracking state. |
| INITIALIZING | [androidJvm] INITIALIZING The anchor is currently initializing and tracking will improve. |
| REMOVED | [androidJvm] REMOVED The anchor has been explicitly removed from tracking. |
| INTERNAL_ERROR | [androidJvm] INTERNAL_ERROR An internal error occurred within the tracking system. |
| PERMISSION_DENIED | [androidJvm] PERMISSION_DENIED Tracking failed due to insufficient permissions. |
| FATAL_NETWORK_ERROR | [androidJvm] FATAL_NETWORK_ERROR A fatal network error prevented tracking. |
Types
| Name | Summary |
|---|---|
| Companion | [androidJvm] object Companion |
Properties
| Name | Summary |
|---|---|
| entries | [androidJvm] val entries: EnumEntries<AnchorTrackingStateReason> Returns a representation of an immutable list of all enum entries, in the order they're declared. |
| name | [androidJvm] val name: String |
| ordinal | [androidJvm] val ordinal: Int |
| value | [androidJvm] val value: Int |
Functions
| Name | Summary |
|---|---|
| valueOf | [androidJvm] fun valueOf(value: String): AnchorTrackingStateReason Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.) |
| values | [androidJvm] fun values(): Array<AnchorTrackingStateReason> Returns an array containing the constants of this enum type, in the order they're declared. |