다음을 통해 공유


SmsDevice.SmsMessageReceived 이벤트

정의

디바이스에서 새 문자 메시지를 받을 때 호출할 이벤트 처리기를 설정합니다.

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

이벤트 유형

구현

특성

Windows 요구 사항

앱 기능
cellularMessaging sms

적용 대상