Bagikan melalui


SmsDevice.FromIdAsync(String) Metode

Definisi

Membuat instans SmsDevice untuk perangkat yang menerima pesan SMS.

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)

Parameter

deviceId
String

Platform::String

winrt::hstring

Representasi string dari ID DeviceInformation dari perangkat SMS yang menerima pesan SMS.

Mengembalikan

Objek operasi perangkat SMS.

Atribut

Persyaratan Windows

Kemampuan aplikasi
cellularMessaging sms

Keterangan

Antarmuka SmsReceivedEventDetails menangani detail pesan yang diterima; Anda dapat meneruskan ID DeviceInformation dari antarmuka tersebut ke metode ini untuk mengaktifkan perangkat dan mengambil detail pesan tambahan, seperti pengirim dan isi pesan. Karena perangkat mungkin sibuk, operasi dijalankan secara asinkron. Objek operasi asinkron segera kembali.

Berlaku untuk