Answered by:
How does metro app use Wi-Fi direct?

Question
-
I found that there are several APIs for Wi-Fi direct: 1) WFDOpenHandle; 2) WFDCloseHandle; 3) WFDStartOpenSession; 4) WFDCloseSession, etc. However, in metro app, how to use the Wi-Fi direct APIs to communicate with other app in nearby device? It seems proximity is about Wi-Fi direct, but users must tap & go to pairing. If I want to discover the device, and connect it, transfer the file to nearby apps. What should I do? Thanks!
Wednesday, February 22, 2012 3:39 AM
Answers
-
Hi Dongjjing,
Take a look at the //build/ session Understanding Wi-Fi Direct in Windows 8. Yatharth answers this directly at timecode 42:50. For Metro style apps Wi-Fi Direct connections are available through application centric API such as Proximity and PlayTo. For low level control of the connection you would need a Desktop app to use the Win32 API.
--Rob
- Marked as answer by Rob Caplan [MSFT]Microsoft employee, Moderator Wednesday, February 29, 2012 4:34 AM
Thursday, February 23, 2012 1:56 AMModerator
All replies
-
The 4 APIs you mentioned are for Desktop apps as evidenced by the header.
#pragma region Desktop Family #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
I'm currently looking into this to see if there are any other possible options aside from the proximity solution you mentioned.
Thanks,
-David
Thursday, February 23, 2012 1:26 AMModerator -
Hi Dongjjing,
Take a look at the //build/ session Understanding Wi-Fi Direct in Windows 8. Yatharth answers this directly at timecode 42:50. For Metro style apps Wi-Fi Direct connections are available through application centric API such as Proximity and PlayTo. For low level control of the connection you would need a Desktop app to use the Win32 API.
--Rob
- Marked as answer by Rob Caplan [MSFT]Microsoft employee, Moderator Wednesday, February 29, 2012 4:34 AM
Thursday, February 23, 2012 1:56 AMModerator -
Hi DavidLamb,
Any update? Thanks!
Tuesday, February 28, 2012 7:45 AM -
Hi Rob Caplan,
I know Proximity's API, how about PlayTo's API? I mean can you tell me the namespace and class about PlayTo? Thanks!
Tuesday, February 28, 2012 7:47 AM -
Wednesday, February 29, 2012 4:34 AMModerator
-
Hi Rob Caplan,
Thanks!
Monday, March 5, 2012 5:40 AM -
Hello,
Here is an article to help you transfer data/files VERY easily with Wifi-Direct between 2 Win8 peers.
It includes a WinRT lib written in C# you can use for your own.
Stéphanie H. Relations Techniques Développeurs - Microsoft
Wednesday, December 18, 2013 3:32 PM