共用方式為


SmsReceivedEventDetails.DeviceId 屬性

定義

傳回接收 SMS 訊息之網路介面的 DeviceInformation 識別碼。 此識別碼可以傳遞至 SmsDevice.FromIdAsync 來啟用裝置並擷取其他訊息詳細資料。

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

屬性值

String

Platform::String

winrt::hstring

字串,包含 SMS 網路介面的 DeviceInformation 識別碼, (裝置) 。 此值通常用於擷取詳細資料,例如寄件者和郵件本文。 例如,您可以使用識別碼來顯示快顯視窗,告知使用者特定人員的新訊息已到達。 DeviceId 和 MessageIndex 的組合足以從 SMS 裝置擷取新的訊息。

屬性

Windows 需求

應用程式功能
cellularMessaging sms

適用於