ProximityDevice.PublishUriMessage(Uri) | publishUriMessage(Uri) method

Applies to Windows and Windows Phone

Publishes a Uniform Resource Identifier (URI) to a proximate device.

Syntax


public:
long long PublishUriMessage(
  Uri^ message
)

Parameters

message

Type: Windows.Foundation.Uri [JavaScript] | System.Uri [.NET] | Windows::Foundation::Uri [C++]

The URI to publish.

Return value

Type: Number [JavaScript] | System.Int64 [.NET] | int64 [C++]

The publication ID of the message.

Remarks

Only one URI can be published at a time for each proximity device.

You can stop publishing a URI by passing the publication ID returned by the PublishUriMessage method to the StopPublishingMessage method.

Unlike the other publish methods for a proximity device, URI publishing is handled by the default protocol handler for the URI. A subscription to a URI message publication is not required. You can receive URI messages by registering a default handler for a URI protocol such as the HTTP protocol.

The PackageFamilyName value of the sending application is automatically sent along with the URI. If no handler is registered for the protocol of a URI, the PackageFamilyName value of the sending application is used to direct the receiving application to the application store.

You can use the PublishMessage method to publish a text message to a proximate computer. You can use the PublishBinaryMessage method to publish non-text messages or messages that conform to the NDEF messaging standard.

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.

Examples

No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.

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]

See also

ProximityDevice
PublishUriMessage(Uri, MessageTransmittedHandler)
Proximity and Tapping (JavaScript)
Proximity and Tapping (C#/VB/C++)
Samples
Proximity sample

 

 

Show:
© 2014 Microsoft