Bagikan melalui


SmsMessageReceivedEventHandler Delegasikan

Definisi

Penanganan aktivitas ini dipanggil ketika pesan biner baru diterima. Penelepon harus menerapkan ini ketika mereka ingin menangani pesan biner baru dari perangkat SMS tertentu.

Catatan

Fungsionalitas ini hanya tersedia untuk aplikasi operator seluler dan aplikasi UWP yang diberikan akses istimewa oleh operator jaringan seluler, adaptor broadband seluler IHV, atau OEM. Untuk informasi selengkapnya, lihat Broadband Seluler.

Catatan

Kelas ini dan metodenya didukung untuk pemeliharaan aplikasi desktop lama yang menggunakannya di versi Windows sebelumnya. Jika Anda menggunakan kelas ini, maka Anda harus menentukan Windows.Devices.Sms.LegacySmsApiContract dalam manifes aplikasi Anda. Jangan gunakan kelas ini jika Anda mengembangkan aplikasi baru untuk Windows. Sebagai gantinya, gunakan API di namespace layanan ini yang tidak memerlukan Windows.Devices.Sms.LegacySmsApiContract.

public delegate void SmsMessageReceivedEventHandler(SmsDevice ^ sender, SmsMessageReceivedEventArgs ^ e);
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Devices.Sms.LegacySmsApiContract, 65536)]
/// [Windows.Foundation.Metadata.Deprecated("SmsMessageReceivedEventHandler may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Devices.Sms.LegacySmsApiContract)]
/// [Windows.Foundation.Metadata.Guid(192599049, 60461, 18382, 162, 83, 115, 43, 238, 235, 202, 205)]
class SmsMessageReceivedEventHandler : MulticastDelegate
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Devices.Sms.LegacySmsApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(192599049, 60461, 18382, 162, 83, 115, 43, 238, 235, 202, 205)]
/// [Windows.Foundation.Metadata.Deprecated("SmsMessageReceivedEventHandler may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
class SmsMessageReceivedEventHandler : MulticastDelegate
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Devices.Sms.LegacySmsApiContract), 65536)]
[Windows.Foundation.Metadata.Deprecated("SmsMessageReceivedEventHandler may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Devices.Sms.LegacySmsApiContract))]
[Windows.Foundation.Metadata.Guid(192599049, 60461, 18382, 162, 83, 115, 43, 238, 235, 202, 205)]
public delegate void SmsMessageReceivedEventHandler(SmsDevice sender, SmsMessageReceivedEventArgs e);
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Devices.Sms.LegacySmsApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(192599049, 60461, 18382, 162, 83, 115, 43, 238, 235, 202, 205)]
[Windows.Foundation.Metadata.Deprecated("SmsMessageReceivedEventHandler may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
public delegate void SmsMessageReceivedEventHandler(SmsDevice sender, SmsMessageReceivedEventArgs e);
var smsMessageReceivedEventHandlerHandler = function(sender, e){
/* Your code */
}
Public Delegate Sub SmsMessageReceivedEventHandler(sender As SmsDevice, e As SmsMessageReceivedEventArgs)

Parameter

sender
SmsDevice

Referensi ke objek perangkat SMS yang mengirim pesan.

e
SmsMessageReceivedEventArgs

Objek yang menyimpan representasi biner dan teks pesan.

Atribut

Persyaratan Windows

Rangkaian perangkat
Windows Desktop Extension SDK (diperkenalkan dalam 10.0.10240.0)
API contract
Windows.Devices.Sms.LegacySmsApiContract (diperkenalkan dalam v1.0)
Kemampuan aplikasi
cellularMessaging sms

Berlaku untuk