-api-id | -api-type | -api-device-family-note |
---|---|---|
T:Windows.Networking.Proximity.ProximityDevice |
winrt class |
xbox |
Enables you to publish messages to proximate devices or subscribe to messages from proximate devices.
The ProximityDevice class enables applications to communicate with running applications on devices, typically within a range of 3 centimeters to 4 centimeters.
You can create an instance of ProximityDevice by using the GetDefault or FromId static method.
The ProximityDevice class uses publish/subscribe semantics and is useful for advertising and receiving small blocks of data. For larger amounts of data, or for persistent communications, use the PeerFinder and StreamSocket classes. For UWP apps, publications and subscriptions are active only if the calling app is in the foreground.
Important
The proximity APIs do not provide authentication, encryption, or message integrity. Do not use proximity to exchange user sensitive information such as passwords, financial data, text messages, email, photographs, or government id numbers.
[!code-csharpArriveDepart]
[!code-vbArriveDepart]
Proximity and Tapping (C#/VB/C++), Proximity sample
proximity ID_CAP_PROXIMITY [Windows Phone], ID_CAP_PROXIMITY [Windows Phone]