Tries to cancel the execution of this operation. If the operation was cancelled by this
invocation, this method returnstrueand the associated callback (if any) will never be
invoked.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eVpsAvailabilityFuture\u003c/code\u003e handles asynchronous operations initiated by \u003ccode\u003eSession.checkVpsAvailabilityAsync()\u003c/code\u003e, providing a way to check the availability of Visual Positioning Service (VPS).\u003c/p\u003e\n"],["\u003cp\u003eIt offers methods like \u003ccode\u003ecancel()\u003c/code\u003e, \u003ccode\u003egetResult()\u003c/code\u003e, and \u003ccode\u003egetState()\u003c/code\u003e to manage and retrieve the outcome of the VPS availability check.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egetResult()\u003c/code\u003e returns the \u003ccode\u003eVpsAvailability\u003c/code\u003e which indicates the VPS status, but it's only valid when \u003ccode\u003egetState()\u003c/code\u003e returns \u003ccode\u003eFutureState.DONE\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use \u003ccode\u003ecancel()\u003c/code\u003e to attempt to stop the operation and \u003ccode\u003egetState()\u003c/code\u003e to track its progress.\u003c/p\u003e\n"]]],[],null,["# VpsAvailabilityFuture\n\n`\npublic class\n`**VpsAvailabilityFuture**`\n` \nHandle to an async operation launched by [Session.checkVpsAvailabilityAsync(double, double, Consumer)](/ar/reference/java/com/google/ar/core/Session#checkVpsAvailabilityAsync(double,%20double,%20java.util.function.Consumer\u003ccom.google.ar.core.VpsAvailability\u003e)). \n\nPublic Methods\n--------------\n\n|--------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| ` boolean ` | [cancel](/ar/reference/java/com/google/ar/core/VpsAvailabilityFuture#cancel())`()` Tries to cancel the execution of this operation. |\n| ` `[VpsAvailability](/ar/reference/java/com/google/ar/core/VpsAvailability)` ` | [getResult](/ar/reference/java/com/google/ar/core/VpsAvailabilityFuture#getResult())`()` Returns the result of the async operation. |\n| ` `[FutureState](/ar/reference/java/com/google/ar/core/FutureState)` ` | [getState](/ar/reference/java/com/google/ar/core/VpsAvailabilityFuture#getState())`()` Get the current state of the future. |\n\nInherited Methods\n-----------------\n\nFrom `class\njava.lang.Object` \n\n|---------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|\n| ` `[Object](https://developer.android.com/reference/java/lang/Object)` ` | clone`()` |\n| ` boolean ` | equals`(`[Object](https://developer.android.com/reference/java/lang/Object)` arg0)` |\n| ` void ` | finalize`()` |\n| ` final `[Class](https://developer.android.com/reference/java/lang/Class)`\u003c?\u003e ` | getClass`()` |\n| ` int ` | hashCode`()` |\n| ` final void ` | notify`()` |\n| ` final void ` | notifyAll`()` |\n| ` `[String](https://developer.android.com/reference/java/lang/String)` ` | toString`()` |\n| ` final void ` | wait`(long arg0, int arg1)` |\n| ` final void ` | wait`(long arg0)` |\n| ` final void ` | wait`()` |\n\nFrom `interface\n`[com.google.ar.core.Future](/ar/reference/java/com/google/ar/core/Future) \n\n|---------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------|\n| ` abstract boolean ` | [cancel](/ar/reference/java/com/google/ar/core/Future#cancel())`()` Tries to cancel the execution of this operation. |\n| ` abstract `[FutureState](/ar/reference/java/com/google/ar/core/FutureState)` ` | [getState](/ar/reference/java/com/google/ar/core/Future#getState())`()` Get the current state of the future. |\n\nPublic Methods\n--------------\n\n#### public\nboolean\ncancel\n()\n\n### cancel\n\n```java\npublic boolean cancel()\n``` \nTries to cancel the execution of this operation. If the operation was cancelled by this\ninvocation, this method returns `true` and the associated callback (if any) will never be\ninvoked.\n\n#### public\n[VpsAvailability](/ar/reference/java/com/google/ar/core/VpsAvailability)\ngetResult\n()\n\n### getResult\n\n```java\npublic VpsAvailability getResult()\n``` \nReturns the result of the async operation. The returned result is only valid when [getState()](/ar/reference/java/com/google/ar/core/VpsAvailabilityFuture#getState()) returns [FutureState.DONE](/ar/reference/java/com/google/ar/core/FutureState#DONE).\n\n#### public\n[FutureState](/ar/reference/java/com/google/ar/core/FutureState)\ngetState\n()\n\n### getState\n\n```java\npublic FutureState getState()\n``` \nGet the current state of the future."]]