SmsDevice.SmsMessageReceived Événement
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Définit un gestionnaire d’événements à appeler lorsque l’appareil reçoit un nouveau sms.
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
Type d'événement
Implémente
- Attributs
Configuration requise pour Windows
Fonctionnalités de l’application |
cellularMessaging
sms
|