SmsReceivedEventDetails.DeviceId Property

Definition

Returns the DeviceInformation ID of the network interface that received the SMS message. This ID can be passed to SmsDevice.FromIdAsync to activate the device and retrieve additional message details.

public:
 property Platform::String ^ DeviceId { Platform::String ^ get(); };
/// [get: Windows.Foundation.Metadata.Deprecated("SmsReceivedEventDetails may be altered or unavailable for releases after Windows 10. Instead, use SmsMessageReceivedTriggerDetails.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Devices.Sms.LegacySmsApiContract)]
winrt::hstring DeviceId();
/// [get: Windows.Foundation.Metadata.Deprecated("SmsReceivedEventDetails may be altered or unavailable for releases after Windows 10. Instead, use SmsMessageReceivedTriggerDetails.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
winrt::hstring DeviceId();
public string DeviceId { [Windows.Foundation.Metadata.Deprecated("SmsReceivedEventDetails may be altered or unavailable for releases after Windows 10. Instead, use SmsMessageReceivedTriggerDetails.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Devices.Sms.LegacySmsApiContract))] get; }
public string DeviceId { [Windows.Foundation.Metadata.Deprecated("SmsReceivedEventDetails may be altered or unavailable for releases after Windows 10. Instead, use SmsMessageReceivedTriggerDetails.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")] get; }
var string = smsReceivedEventDetails.deviceId;
Public ReadOnly Property DeviceId As String

Property Value

String

Platform::String

winrt::hstring

A string containing the DeviceInformation ID of the SMS network interface (device). This value is typically used to retrieve details such as the sender and the body of the message. For example, you might use the ID to display a popup telling the user that a new message from a particular person has arrived. The combination of DeviceId and MessageIndex is sufficient to retrieve the new message from the SMS device.

Attributes

Windows requirements

App capabilities
cellularMessaging sms

Applies to