SmsDevice.FromIdAsync(String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
public:
static IAsyncOperation<SmsDevice ^> ^ FromIdAsync(Platform::String ^ deviceId);
/// [Windows.Foundation.Metadata.Deprecated("ISmsDeviceStatics may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Devices.Sms.LegacySmsApiContract)]
/// [Windows.Foundation.Metadata.RemoteAsync]
static IAsyncOperation<SmsDevice> FromIdAsync(winrt::hstring const& deviceId);
/// [Windows.Foundation.Metadata.RemoteAsync]
/// [Windows.Foundation.Metadata.Deprecated("ISmsDeviceStatics may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
static IAsyncOperation<SmsDevice> FromIdAsync(winrt::hstring const& deviceId);
[Windows.Foundation.Metadata.Deprecated("ISmsDeviceStatics may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Devices.Sms.LegacySmsApiContract))]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<SmsDevice> FromIdAsync(string deviceId);
[Windows.Foundation.Metadata.RemoteAsync]
[Windows.Foundation.Metadata.Deprecated("ISmsDeviceStatics may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
public static IAsyncOperation<SmsDevice> FromIdAsync(string deviceId);
function fromIdAsync(deviceId)
Public Shared Function FromIdAsync (deviceId As String) As IAsyncOperation(Of SmsDevice)
參數
- deviceId
-
String
Platform::String
winrt::hstring
接收 SMS 訊息之 SMS 裝置的 DeviceInformation 識別碼字串表示。
傳回
SMS 裝置工作物件。
- 屬性
Windows 需求
應用程式功能 |
cellularMessaging
sms
|
備註
SmsReceivedEventDetails介面會處理所接收訊息的詳細資料;您可以將DeviceInformation識別碼從該介面傳遞至這個方法,以啟動裝置並擷取其他訊息詳細資料,例如寄件者和訊息本文。 因為裝置可能忙碌中,所以作業會以非同步方式執行。 非同步作業物件會立即傳回。