Class METAColocationDiscovery
Colocation discovery is a capability available through the XR_META_colocation_discovery extension that allows apps to discover physically colocated devices running the same app.
In the context of this extension, "the same application" means "bytewise identical Android package name" when running on an Android-based platform.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intExtendsXrResult.static final intExtendsXrResult.static final intExtendsXrResult.static final intExtendsXrResult.static final intXR_MAX_COLOCATION_DISCOVERY_BUFFER_SIZE_METAstatic final StringThe extension name.static final intThe extension specification version.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType. -
Method Summary
Modifier and TypeMethodDescriptionstatic intnxrStartColocationAdvertisementMETA(XrSession session, long info, long advertisementRequestId) Unsafe version of:StartColocationAdvertisementMETAstatic intnxrStartColocationDiscoveryMETA(XrSession session, long info, long discoveryRequestId) Unsafe version of:StartColocationDiscoveryMETAstatic intnxrStopColocationAdvertisementMETA(XrSession session, long info, long requestId) Unsafe version of:StopColocationAdvertisementMETAstatic intnxrStopColocationDiscoveryMETA(XrSession session, long info, long requestId) Unsafe version of:StopColocationDiscoveryMETAstatic intxrStartColocationAdvertisementMETA(XrSession session, XrColocationAdvertisementStartInfoMETA info, LongBuffer advertisementRequestId) Start colocation visibility.static intxrStartColocationDiscoveryMETA(XrSession session, XrColocationDiscoveryStartInfoMETA info, LongBuffer discoveryRequestId) Start colocation discovery.static intxrStopColocationAdvertisementMETA(XrSession session, XrColocationAdvertisementStopInfoMETA info, LongBuffer requestId) Stop colocation advertisement.static intxrStopColocationDiscoveryMETA(XrSession session, XrColocationDiscoveryStopInfoMETA info, LongBuffer requestId) Stop ongoing discovery process.
-
Field Details
-
XR_META_colocation_discovery_SPEC_VERSION
public static final int XR_META_colocation_discovery_SPEC_VERSIONThe extension specification version.- See Also:
-
XR_META_COLOCATION_DISCOVERY_EXTENSION_NAME
The extension name.- See Also:
-
XR_MAX_COLOCATION_DISCOVERY_BUFFER_SIZE_META
public static final int XR_MAX_COLOCATION_DISCOVERY_BUFFER_SIZE_METAXR_MAX_COLOCATION_DISCOVERY_BUFFER_SIZE_META- See Also:
-
XR_ERROR_COLOCATION_DISCOVERY_NETWORK_FAILED_META
public static final int XR_ERROR_COLOCATION_DISCOVERY_NETWORK_FAILED_METAExtendsXrResult.Enum values:
- See Also:
-
XR_ERROR_COLOCATION_DISCOVERY_NO_DISCOVERY_METHOD_META
public static final int XR_ERROR_COLOCATION_DISCOVERY_NO_DISCOVERY_METHOD_METAExtendsXrResult.Enum values:
- See Also:
-
XR_COLOCATION_DISCOVERY_ALREADY_ADVERTISING_META
public static final int XR_COLOCATION_DISCOVERY_ALREADY_ADVERTISING_METAExtendsXrResult.Enum values:
- See Also:
-
XR_COLOCATION_DISCOVERY_ALREADY_DISCOVERING_META
public static final int XR_COLOCATION_DISCOVERY_ALREADY_DISCOVERING_METAExtendsXrResult.Enum values:
- See Also:
-
XR_TYPE_COLOCATION_DISCOVERY_START_INFO_META
public static final int XR_TYPE_COLOCATION_DISCOVERY_START_INFO_METAExtendsXrStructureType.Enum values:
TYPE_COLOCATION_DISCOVERY_START_INFO_METATYPE_COLOCATION_DISCOVERY_STOP_INFO_METATYPE_COLOCATION_ADVERTISEMENT_START_INFO_METATYPE_COLOCATION_ADVERTISEMENT_STOP_INFO_METATYPE_EVENT_DATA_START_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_STOP_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_START_COLOCATION_DISCOVERY_COMPLETE_METATYPE_EVENT_DATA_COLOCATION_DISCOVERY_RESULT_METATYPE_EVENT_DATA_COLOCATION_DISCOVERY_COMPLETE_METATYPE_EVENT_DATA_STOP_COLOCATION_DISCOVERY_COMPLETE_METATYPE_SYSTEM_COLOCATION_DISCOVERY_PROPERTIES_META
- See Also:
-
XR_TYPE_COLOCATION_DISCOVERY_STOP_INFO_META
public static final int XR_TYPE_COLOCATION_DISCOVERY_STOP_INFO_METAExtendsXrStructureType.Enum values:
TYPE_COLOCATION_DISCOVERY_START_INFO_METATYPE_COLOCATION_DISCOVERY_STOP_INFO_METATYPE_COLOCATION_ADVERTISEMENT_START_INFO_METATYPE_COLOCATION_ADVERTISEMENT_STOP_INFO_METATYPE_EVENT_DATA_START_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_STOP_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_START_COLOCATION_DISCOVERY_COMPLETE_METATYPE_EVENT_DATA_COLOCATION_DISCOVERY_RESULT_METATYPE_EVENT_DATA_COLOCATION_DISCOVERY_COMPLETE_METATYPE_EVENT_DATA_STOP_COLOCATION_DISCOVERY_COMPLETE_METATYPE_SYSTEM_COLOCATION_DISCOVERY_PROPERTIES_META
- See Also:
-
XR_TYPE_COLOCATION_ADVERTISEMENT_START_INFO_META
public static final int XR_TYPE_COLOCATION_ADVERTISEMENT_START_INFO_METAExtendsXrStructureType.Enum values:
TYPE_COLOCATION_DISCOVERY_START_INFO_METATYPE_COLOCATION_DISCOVERY_STOP_INFO_METATYPE_COLOCATION_ADVERTISEMENT_START_INFO_METATYPE_COLOCATION_ADVERTISEMENT_STOP_INFO_METATYPE_EVENT_DATA_START_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_STOP_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_START_COLOCATION_DISCOVERY_COMPLETE_METATYPE_EVENT_DATA_COLOCATION_DISCOVERY_RESULT_METATYPE_EVENT_DATA_COLOCATION_DISCOVERY_COMPLETE_METATYPE_EVENT_DATA_STOP_COLOCATION_DISCOVERY_COMPLETE_METATYPE_SYSTEM_COLOCATION_DISCOVERY_PROPERTIES_META
- See Also:
-
XR_TYPE_COLOCATION_ADVERTISEMENT_STOP_INFO_META
public static final int XR_TYPE_COLOCATION_ADVERTISEMENT_STOP_INFO_METAExtendsXrStructureType.Enum values:
TYPE_COLOCATION_DISCOVERY_START_INFO_METATYPE_COLOCATION_DISCOVERY_STOP_INFO_METATYPE_COLOCATION_ADVERTISEMENT_START_INFO_METATYPE_COLOCATION_ADVERTISEMENT_STOP_INFO_METATYPE_EVENT_DATA_START_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_STOP_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_START_COLOCATION_DISCOVERY_COMPLETE_METATYPE_EVENT_DATA_COLOCATION_DISCOVERY_RESULT_METATYPE_EVENT_DATA_COLOCATION_DISCOVERY_COMPLETE_METATYPE_EVENT_DATA_STOP_COLOCATION_DISCOVERY_COMPLETE_METATYPE_SYSTEM_COLOCATION_DISCOVERY_PROPERTIES_META
- See Also:
-
XR_TYPE_EVENT_DATA_START_COLOCATION_ADVERTISEMENT_COMPLETE_META
public static final int XR_TYPE_EVENT_DATA_START_COLOCATION_ADVERTISEMENT_COMPLETE_METAExtendsXrStructureType.Enum values:
TYPE_COLOCATION_DISCOVERY_START_INFO_METATYPE_COLOCATION_DISCOVERY_STOP_INFO_METATYPE_COLOCATION_ADVERTISEMENT_START_INFO_METATYPE_COLOCATION_ADVERTISEMENT_STOP_INFO_METATYPE_EVENT_DATA_START_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_STOP_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_START_COLOCATION_DISCOVERY_COMPLETE_METATYPE_EVENT_DATA_COLOCATION_DISCOVERY_RESULT_METATYPE_EVENT_DATA_COLOCATION_DISCOVERY_COMPLETE_METATYPE_EVENT_DATA_STOP_COLOCATION_DISCOVERY_COMPLETE_METATYPE_SYSTEM_COLOCATION_DISCOVERY_PROPERTIES_META
- See Also:
-
XR_TYPE_EVENT_DATA_STOP_COLOCATION_ADVERTISEMENT_COMPLETE_META
public static final int XR_TYPE_EVENT_DATA_STOP_COLOCATION_ADVERTISEMENT_COMPLETE_METAExtendsXrStructureType.Enum values:
TYPE_COLOCATION_DISCOVERY_START_INFO_METATYPE_COLOCATION_DISCOVERY_STOP_INFO_METATYPE_COLOCATION_ADVERTISEMENT_START_INFO_METATYPE_COLOCATION_ADVERTISEMENT_STOP_INFO_METATYPE_EVENT_DATA_START_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_STOP_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_START_COLOCATION_DISCOVERY_COMPLETE_METATYPE_EVENT_DATA_COLOCATION_DISCOVERY_RESULT_METATYPE_EVENT_DATA_COLOCATION_DISCOVERY_COMPLETE_METATYPE_EVENT_DATA_STOP_COLOCATION_DISCOVERY_COMPLETE_METATYPE_SYSTEM_COLOCATION_DISCOVERY_PROPERTIES_META
- See Also:
-
XR_TYPE_EVENT_DATA_COLOCATION_ADVERTISEMENT_COMPLETE_META
public static final int XR_TYPE_EVENT_DATA_COLOCATION_ADVERTISEMENT_COMPLETE_METAExtendsXrStructureType.Enum values:
TYPE_COLOCATION_DISCOVERY_START_INFO_METATYPE_COLOCATION_DISCOVERY_STOP_INFO_METATYPE_COLOCATION_ADVERTISEMENT_START_INFO_METATYPE_COLOCATION_ADVERTISEMENT_STOP_INFO_METATYPE_EVENT_DATA_START_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_STOP_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_START_COLOCATION_DISCOVERY_COMPLETE_METATYPE_EVENT_DATA_COLOCATION_DISCOVERY_RESULT_METATYPE_EVENT_DATA_COLOCATION_DISCOVERY_COMPLETE_METATYPE_EVENT_DATA_STOP_COLOCATION_DISCOVERY_COMPLETE_METATYPE_SYSTEM_COLOCATION_DISCOVERY_PROPERTIES_META
- See Also:
-
XR_TYPE_EVENT_DATA_START_COLOCATION_DISCOVERY_COMPLETE_META
public static final int XR_TYPE_EVENT_DATA_START_COLOCATION_DISCOVERY_COMPLETE_METAExtendsXrStructureType.Enum values:
TYPE_COLOCATION_DISCOVERY_START_INFO_METATYPE_COLOCATION_DISCOVERY_STOP_INFO_METATYPE_COLOCATION_ADVERTISEMENT_START_INFO_METATYPE_COLOCATION_ADVERTISEMENT_STOP_INFO_METATYPE_EVENT_DATA_START_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_STOP_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_START_COLOCATION_DISCOVERY_COMPLETE_METATYPE_EVENT_DATA_COLOCATION_DISCOVERY_RESULT_METATYPE_EVENT_DATA_COLOCATION_DISCOVERY_COMPLETE_METATYPE_EVENT_DATA_STOP_COLOCATION_DISCOVERY_COMPLETE_METATYPE_SYSTEM_COLOCATION_DISCOVERY_PROPERTIES_META
- See Also:
-
XR_TYPE_EVENT_DATA_COLOCATION_DISCOVERY_RESULT_META
public static final int XR_TYPE_EVENT_DATA_COLOCATION_DISCOVERY_RESULT_METAExtendsXrStructureType.Enum values:
TYPE_COLOCATION_DISCOVERY_START_INFO_METATYPE_COLOCATION_DISCOVERY_STOP_INFO_METATYPE_COLOCATION_ADVERTISEMENT_START_INFO_METATYPE_COLOCATION_ADVERTISEMENT_STOP_INFO_METATYPE_EVENT_DATA_START_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_STOP_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_START_COLOCATION_DISCOVERY_COMPLETE_METATYPE_EVENT_DATA_COLOCATION_DISCOVERY_RESULT_METATYPE_EVENT_DATA_COLOCATION_DISCOVERY_COMPLETE_METATYPE_EVENT_DATA_STOP_COLOCATION_DISCOVERY_COMPLETE_METATYPE_SYSTEM_COLOCATION_DISCOVERY_PROPERTIES_META
- See Also:
-
XR_TYPE_EVENT_DATA_COLOCATION_DISCOVERY_COMPLETE_META
public static final int XR_TYPE_EVENT_DATA_COLOCATION_DISCOVERY_COMPLETE_METAExtendsXrStructureType.Enum values:
TYPE_COLOCATION_DISCOVERY_START_INFO_METATYPE_COLOCATION_DISCOVERY_STOP_INFO_METATYPE_COLOCATION_ADVERTISEMENT_START_INFO_METATYPE_COLOCATION_ADVERTISEMENT_STOP_INFO_METATYPE_EVENT_DATA_START_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_STOP_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_START_COLOCATION_DISCOVERY_COMPLETE_METATYPE_EVENT_DATA_COLOCATION_DISCOVERY_RESULT_METATYPE_EVENT_DATA_COLOCATION_DISCOVERY_COMPLETE_METATYPE_EVENT_DATA_STOP_COLOCATION_DISCOVERY_COMPLETE_METATYPE_SYSTEM_COLOCATION_DISCOVERY_PROPERTIES_META
- See Also:
-
XR_TYPE_EVENT_DATA_STOP_COLOCATION_DISCOVERY_COMPLETE_META
public static final int XR_TYPE_EVENT_DATA_STOP_COLOCATION_DISCOVERY_COMPLETE_METAExtendsXrStructureType.Enum values:
TYPE_COLOCATION_DISCOVERY_START_INFO_METATYPE_COLOCATION_DISCOVERY_STOP_INFO_METATYPE_COLOCATION_ADVERTISEMENT_START_INFO_METATYPE_COLOCATION_ADVERTISEMENT_STOP_INFO_METATYPE_EVENT_DATA_START_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_STOP_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_START_COLOCATION_DISCOVERY_COMPLETE_METATYPE_EVENT_DATA_COLOCATION_DISCOVERY_RESULT_METATYPE_EVENT_DATA_COLOCATION_DISCOVERY_COMPLETE_METATYPE_EVENT_DATA_STOP_COLOCATION_DISCOVERY_COMPLETE_METATYPE_SYSTEM_COLOCATION_DISCOVERY_PROPERTIES_META
- See Also:
-
XR_TYPE_SYSTEM_COLOCATION_DISCOVERY_PROPERTIES_META
public static final int XR_TYPE_SYSTEM_COLOCATION_DISCOVERY_PROPERTIES_METAExtendsXrStructureType.Enum values:
TYPE_COLOCATION_DISCOVERY_START_INFO_METATYPE_COLOCATION_DISCOVERY_STOP_INFO_METATYPE_COLOCATION_ADVERTISEMENT_START_INFO_METATYPE_COLOCATION_ADVERTISEMENT_STOP_INFO_METATYPE_EVENT_DATA_START_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_STOP_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_COLOCATION_ADVERTISEMENT_COMPLETE_METATYPE_EVENT_DATA_START_COLOCATION_DISCOVERY_COMPLETE_METATYPE_EVENT_DATA_COLOCATION_DISCOVERY_RESULT_METATYPE_EVENT_DATA_COLOCATION_DISCOVERY_COMPLETE_METATYPE_EVENT_DATA_STOP_COLOCATION_DISCOVERY_COMPLETE_METATYPE_SYSTEM_COLOCATION_DISCOVERY_PROPERTIES_META
- See Also:
-
-
Method Details
-
nxrStartColocationDiscoveryMETA
public static int nxrStartColocationDiscoveryMETA(XrSession session, long info, long discoveryRequestId) Unsafe version of:StartColocationDiscoveryMETA -
xrStartColocationDiscoveryMETA
public static int xrStartColocationDiscoveryMETA(XrSession session, XrColocationDiscoveryStartInfoMETA info, LongBuffer discoveryRequestId) Start colocation discovery.C Specification
The
StartColocationDiscoveryMETAfunction is defined as:XrResult xrStartColocationDiscoveryMETA( XrSession session, const XrColocationDiscoveryStartInfoMETA* info, XrAsyncRequestIdFB* discoveryRequestId);Description
The application can call
StartColocationDiscoveryMETAto start discovering physically colocated devices.If the system does not support colocation advertisement and discovery, the runtime must return
ERROR_FEATURE_UNSUPPORTEDfromStartColocationDiscoveryMETA. In this case, the runtime must returnFALSEforXrSystemColocationDiscoveryPropertiesMETA::supportsColocationDiscoverywhen the functionGetSystemPropertiesis called, so that the application knows to not use this functionality.This is an asynchronous operation. Completion results are conveyed in the event
XrEventDataStartColocationDiscoveryCompleteMETA.If the asynchronous operation is scheduled successfully, the runtime must return
SUCCESS.If and only if the runtime returns
SUCCESS, the runtime must queue a singleXrEventDataStartColocationDiscoveryCompleteMETAevent identified with adiscoveryRequestIdmatching thediscoveryRequestIdvalue output by this function, referred to as the "corresponding completion event."(This implies that if the runtime returns anything other than
SUCCESS, the runtime must not queue anyXrEventDataStartColocationDiscoveryCompleteMETAevents withdiscoveryRequestIdfield matching thediscoveryRequestIdpopulated by this function.)If the asynchronous operation is successful, in the corresponding completion event, the runtime must set the
XrEventDataStartColocationDiscoveryCompleteMETA::resultfield toSUCCESS. The runtime may subsequently queue zero or moreXrEventDataColocationDiscoveryResultMETAevents asynchronously as the runtime discovers nearby advertisements. Once the application or runtime stops the colocation discovery, the runtime must queue a singleXrEventDataColocationDiscoveryCompleteMETAevent. AllXrEventDataColocationDiscoveryResultMETAandXrEventDataColocationDiscoveryCompleteMETAevents will identified withdiscoveryRequestIdmatching the value populated indiscoveryRequestIdbyStartColocationDiscoveryMETA.If the asynchronous operation is scheduled but not successful, in the corresponding completion event, the runtime must set the
XrEventDataStartColocationDiscoveryCompleteMETA::resultfield to an appropriate error code instead ofSUCCESS.If the application already has an active colocation discovery, in the corresponding completion event, the runtime must set the
XrEventDataStartColocationDiscoveryCompleteMETA::resultfield toCOLOCATION_DISCOVERY_ALREADY_DISCOVERING_META.Valid Usage (Implicit)
- The
XR_META_colocation_discoveryextension must be enabled prior to callingStartColocationDiscoveryMETA sessionmust be a validXrSessionhandleinfomust be a pointer to a validXrColocationDiscoveryStartInfoMETAstructurediscoveryRequestIdmust be a pointer to anXrAsyncRequestIdFBvalue
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
XrColocationDiscoveryStartInfoMETA,XrEventDataStartColocationDiscoveryCompleteMETA- Parameters:
session- anXrSessionin which the colocation discovery will be active.info- a pointer toXrColocationDiscoveryStartInfoMETAstructure to specify the discovery request information.discoveryRequestId- an output parameter, and the variable it points to will be populated with the ID of this asynchronous request. Note that this ID is used for associating additional events with this original call, in addition to the typical completion event.
- The
-
nxrStopColocationDiscoveryMETA
Unsafe version of:StopColocationDiscoveryMETA -
xrStopColocationDiscoveryMETA
public static int xrStopColocationDiscoveryMETA(XrSession session, XrColocationDiscoveryStopInfoMETA info, LongBuffer requestId) Stop ongoing discovery process.C Specification
The
StopColocationDiscoveryMETAfunction is defined as:XrResult xrStopColocationDiscoveryMETA( XrSession session, const XrColocationDiscoveryStopInfoMETA* info, XrAsyncRequestIdFB* requestId);Description
The application can call
StopColocationDiscoveryMETAto stop an ongoing discovery process that was started byStartColocationDiscoveryMETA.If the system does not support colocation advertisement and discovery, the runtime must return
ERROR_FEATURE_UNSUPPORTEDfromStopColocationDiscoveryMETA. In this case, the runtime must returnFALSEforXrSystemColocationDiscoveryPropertiesMETA::supportsColocationDiscoverywhen the functionGetSystemPropertiesis called, so that the application knows to not use this functionality.This is an asynchronous operation. Completion results are conveyed in the event
XrEventDataStopColocationDiscoveryCompleteMETA.If the asynchronous operation is scheduled successfully, the runtime must return
SUCCESS.If and only if the runtime returns
SUCCESS, the runtime must queue a singleXrEventDataStopColocationDiscoveryCompleteMETAevent identified with arequestIdmatching therequestIdvalue output by this function, referred to as the "corresponding completion event."(This implies that if the runtime returns anything other than
SUCCESS, the runtime must not queue anyXrEventDataStopColocationDiscoveryCompleteMETAevents withrequestIdfield matching therequestIdpopulated by this function.)If the asynchronous operation is successful, in the corresponding completion event, the runtime must set the
XrEventDataStopColocationDiscoveryCompleteMETA::resultfield toSUCCESS.If the asynchronous operation is scheduled but not successful, in the corresponding completion event, the runtime must set the
XrEventDataStopColocationDiscoveryCompleteMETA::resultfield to an appropriate error code instead ofSUCCESS.Valid Usage (Implicit)
- The
XR_META_colocation_discoveryextension must be enabled prior to callingStopColocationDiscoveryMETA sessionmust be a validXrSessionhandleinfomust be a pointer to a validXrColocationDiscoveryStopInfoMETAstructurerequestIdmust be a pointer to anXrAsyncRequestIdFBvalue
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
XrColocationDiscoveryStopInfoMETA,StartColocationDiscoveryMETA- Parameters:
session- anXrSessionin which the colocation discovery will be active.info- a pointer toXrColocationDiscoveryStopInfoMETAstructure to specify the stop discovery request information.requestId- an output parameter, and the variable it points to will be populated with the ID of this asynchronous request.
- The
-
nxrStartColocationAdvertisementMETA
public static int nxrStartColocationAdvertisementMETA(XrSession session, long info, long advertisementRequestId) Unsafe version of:StartColocationAdvertisementMETA -
xrStartColocationAdvertisementMETA
public static int xrStartColocationAdvertisementMETA(XrSession session, XrColocationAdvertisementStartInfoMETA info, LongBuffer advertisementRequestId) Start colocation visibility.C Specification
The
StartColocationAdvertisementMETAfunction is defined as:XrResult xrStartColocationAdvertisementMETA( XrSession session, const XrColocationAdvertisementStartInfoMETA* info, XrAsyncRequestIdFB* advertisementRequestId);Description
The
StartColocationAdvertisementMETAfunction requests that the current device become discoverable by other physically colocated devices running the same application.If the system does not support colocation advertisement and discovery, the runtime must return
ERROR_FEATURE_UNSUPPORTEDfromStartColocationAdvertisementMETA. In this case, the runtime must returnFALSEforXrSystemColocationDiscoveryPropertiesMETA::supportsColocationDiscoverywhen the functionGetSystemPropertiesis called, so that the application knows to not use this functionality.This is an asynchronous operation. Completion results are conveyed in the event
XrEventDataStartColocationAdvertisementCompleteMETA.If the asynchronous operation is scheduled successfully, the runtime must return
SUCCESS.If and only if the runtime returns
SUCCESS, the runtime must queue a singleXrEventDataStartColocationAdvertisementCompleteMETAevent identified with aadvertisementRequestIdmatching theadvertisementRequestIdvalue output by this function, referred to as the "corresponding completion event."(This implies that if the runtime returns anything other than
SUCCESS, the runtime must not queue anyXrEventDataStartColocationAdvertisementCompleteMETAevents withadvertisementRequestIdfield matching theadvertisementRequestIdpopulated by this function.)If the asynchronous operation is successful, in the corresponding completion event, the runtime must set the
XrEventDataStartColocationAdvertisementCompleteMETA::resultfield toSUCCESS.If the asynchronous operation is scheduled but not successful, in the corresponding completion event, the runtime must set the
XrEventDataStartColocationAdvertisementCompleteMETA::resultfield to an appropriate error code instead ofSUCCESS.Valid Usage (Implicit)
- The
XR_META_colocation_discoveryextension must be enabled prior to callingStartColocationAdvertisementMETA sessionmust be a validXrSessionhandleinfomust be a pointer to a validXrColocationAdvertisementStartInfoMETAstructureadvertisementRequestIdmust be a pointer to anXrAsyncRequestIdFBvalue
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
XrColocationAdvertisementStartInfoMETA,XrEventDataStartColocationAdvertisementCompleteMETA- Parameters:
session- anXrSessionin which the colocation discovery will be active.info- a pointer toXrColocationAdvertisementStartInfoMETAstructure to specify the visibility configuration.advertisementRequestId- an output parameter, and the variable it points to will be populated with the ID of this asynchronous request. Note that this ID is used for associating additional events with this original call, in addition to the typical completion event.
- The
-
nxrStopColocationAdvertisementMETA
Unsafe version of:StopColocationAdvertisementMETA -
xrStopColocationAdvertisementMETA
public static int xrStopColocationAdvertisementMETA(XrSession session, XrColocationAdvertisementStopInfoMETA info, LongBuffer requestId) Stop colocation advertisement.C Specification
The
StopColocationAdvertisementMETAfunction is defined as:XrResult xrStopColocationAdvertisementMETA( XrSession session, const XrColocationAdvertisementStopInfoMETA* info, XrAsyncRequestIdFB* requestId);Description
The application can use the
StopColocationAdvertisementMETAfunction to disable the ability for other physically colocated devices running the same application to discover the current device.If the system does not support colocation advertisement and discovery, the runtime must return
ERROR_FEATURE_UNSUPPORTEDfromStopColocationAdvertisementMETA. In this case, the runtime must returnFALSEforXrSystemColocationDiscoveryPropertiesMETA::supportsColocationDiscoverywhen the functionGetSystemPropertiesis called, so that the application knows to not use this functionality.This is an asynchronous operation. Completion results are conveyed in the event
XrEventDataStopColocationAdvertisementCompleteMETA.If the asynchronous operation is scheduled successfully, the runtime must return
SUCCESS.If and only if the runtime returns
SUCCESS, the runtime must queue a singleXrEventDataStopColocationAdvertisementCompleteMETAevent identified with arequestIdmatching therequestIdvalue output by this function, referred to as the "corresponding completion event."(This implies that if the runtime returns anything other than
SUCCESS, the runtime must not queue anyXrEventDataStopColocationAdvertisementCompleteMETAevents withrequestIdfield matching therequestIdpopulated by this function.)If the asynchronous operation is successful, in the corresponding completion event, the runtime must set the
XrEventDataStopColocationAdvertisementCompleteMETA::resultfield toSUCCESS.If the asynchronous operation is scheduled but not successful, in the corresponding completion event, the runtime must set the
XrEventDataStopColocationAdvertisementCompleteMETA::resultfield to an appropriate error code instead ofSUCCESS.Valid Usage (Implicit)
- The
XR_META_colocation_discoveryextension must be enabled prior to callingStopColocationAdvertisementMETA sessionmust be a validXrSessionhandleinfomust be a pointer to a validXrColocationAdvertisementStopInfoMETAstructurerequestIdmust be a pointer to anXrAsyncRequestIdFBvalue
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
XrColocationAdvertisementStopInfoMETA,XrEventDataStopColocationAdvertisementCompleteMETA,StartColocationAdvertisementMETA- Parameters:
session- anXrSessionin which the colocation discovery will be active.info- a pointer toXrColocationAdvertisementStopInfoMETAstructure to specify the advertisement configuration.requestId- an output parameter, and the variable it points to will be populated with the ID of this asynchronous request.
- The
-