SmsDevice.SmsMessageReceived Kejadian
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mengatur penanganan aktivitas yang akan dipanggil saat perangkat menerima pesan teks baru.
public:
virtual event SmsMessageReceivedEventHandler ^ SmsMessageReceived;
/// [add: Windows.Foundation.Metadata.Deprecated("SmsDevice may be altered or unavailable for releases after Windows 10. Instead, use SmsDevice2.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Devices.Sms.LegacySmsApiContract)]
/// [remove: Windows.Foundation.Metadata.Deprecated("SmsDevice may be altered or unavailable for releases after Windows 10. Instead, use SmsDevice2.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Devices.Sms.LegacySmsApiContract)]
// Register
event_token SmsMessageReceived(SmsMessageReceivedEventHandler const& handler) const;
// Revoke with event_token
void SmsMessageReceived(event_token const* cookie) const;
// Revoke with event_revoker
SmsDevice::SmsMessageReceived_revoker SmsMessageReceived(auto_revoke_t, SmsMessageReceivedEventHandler const& handler) const;
/// [add: Windows.Foundation.Metadata.Deprecated("SmsDevice may be altered or unavailable for releases after Windows 10. Instead, use SmsDevice2.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
/// [remove: Windows.Foundation.Metadata.Deprecated("SmsDevice may be altered or unavailable for releases after Windows 10. Instead, use SmsDevice2.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
// Register
event_token SmsMessageReceived(SmsMessageReceivedEventHandler const& handler) const;
// Revoke with event_token
void SmsMessageReceived(event_token const* cookie) const;
// Revoke with event_revoker
SmsDevice::SmsMessageReceived_revoker SmsMessageReceived(auto_revoke_t, SmsMessageReceivedEventHandler const& handler) const;
[add: Windows.Foundation.Metadata.Deprecated("SmsDevice may be altered or unavailable for releases after Windows 10. Instead, use SmsDevice2.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Devices.Sms.LegacySmsApiContract))]
[remove: Windows.Foundation.Metadata.Deprecated("SmsDevice may be altered or unavailable for releases after Windows 10. Instead, use SmsDevice2.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Devices.Sms.LegacySmsApiContract))]
public event SmsMessageReceivedEventHandler SmsMessageReceived;
[add: Windows.Foundation.Metadata.Deprecated("SmsDevice may be altered or unavailable for releases after Windows 10. Instead, use SmsDevice2.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
[remove: Windows.Foundation.Metadata.Deprecated("SmsDevice may be altered or unavailable for releases after Windows 10. Instead, use SmsDevice2.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
public event SmsMessageReceivedEventHandler SmsMessageReceived;
function onSmsMessageReceived(eventArgs) { /* Your code */ }
smsDevice.addEventListener("smsmessagereceived", onSmsMessageReceived);
smsDevice.removeEventListener("smsmessagereceived", onSmsMessageReceived);
- or -
smsDevice.onsmsmessagereceived = onSmsMessageReceived;
Public Custom Event SmsMessageReceived As SmsMessageReceivedEventHandler Implements SmsMessageReceived
Jenis Acara
Penerapan
- Atribut
Persyaratan Windows
Kemampuan aplikasi |
cellularMessaging
sms
|