PeerFinder.Start(String) | start(String) method

Applies to Windows and Windows Phone

Makes an app discoverable to remote peers.

Syntax


Windows.Networking.Proximity.PeerFinder.start(peerMessage);

Parameters

peerMessage

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

The message to deliver to the proximate device.

Remarks

You can call the Start method to begin the process of finding a peer app and to make your app discoverable to remote peers that call the FindAllPeersAsync method. A peer is a device that has an app running in the foreground with a matching AppId. A peer can also have a matching Browse Id that's specified as an alternate identity. For more information, see AlternateIdentities.

You can use this overload of the Start method to send a message to a peer app that will be passed as an app activation argument.

You can connect to only one peer at a time if your app is in the peer or client role. If your app is in the host role, you can connect up to 5 clients at a time.

When an app is activated by tapping a nearby device, the activation parameters indicate whether the PeerFinder should be started or if the app was launched with activation arguments. The format of the activation parameters is "Windows.Networking.Proximity.PeerFinder:StreamSocket Role=<Host|Client>". For more information, see the "Activating apps using Proximity" section of Supporting Proximity and Tapping.

Important  

Always set the DisplayName property to a unique value for your app before you call the Start method.

Windows Phone 8

Wi-Fi Direct is not supported on Windows Phone 8. For more information, see Proximity.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

Windows.Networking.Proximity
Windows::Networking::Proximity [C++]

Metadata

Windows.winmd

Capabilities

proximity
ID_CAP_PROXIMITY [Windows Phone]
ID_CAP_NETWORKING [Windows Phone]

See also

AlternateIdentities
PeerFinder
Start
Proximity and Tapping (JavaScript)
Proximity and Tapping (C#/VB/C++)
Samples
Proximity sample

 

 

Show:
© 2014 Microsoft