Reputation: 796
My goal is basically device discovery over WiFi (devices are connected to the same WiFi network) from a Windows Phone 8 device to a Windows 8 device and any combination of the two.
The Proximity API on Windows Phone 8/Windows 8 does device discovery, but it really wants you to use NFC. For example, the PeerFinder.TriggeredConnectionStateChanged
event only occurs during NFC tap gestures.
My question is, how do I discover other devices without NFC and WiFi-Direct? I know device discovery between Windows Phone 8 and Windows 8 is technically possible if it is the same app running on both devices. This is accomplished in the PixPresenter code sample (which again relies on NFC to discover devices).
The PeerFinder
class has a method findAllPeersAsync
which - together with the boolean PeerFinder.AllowInfrastructure
- would hopefully discover devices running the same app on the same WiFi network, but since I'm not comfortable with Windows Phone 8 and Windows 8 development yet (and code-sharing that comes with it), I haven't been able to get a simple multi-platform app to work yet.
To round it up, is device discovery like this possible? Is the Proximity API the right approach?
Upvotes: 0
Views: 613
Reputation: 796
Right, so the findAllPeersAsync
method doesn't get influenced by the AllowInfrastructure
property. I.e. it is impossible to do device discovery on the same accesspoint using the Proximity API.
The only other approach which is supported by WP8 and W8 is using multicast sockets. An example of such app (for windows phone to windows phone communication) can be found here: http://blogs.msdn.com/b/wsdevsol/archive/2013/03/19/datagram-socket-communication-in-windows-phone-8.aspx
Upvotes: 0