다음을 통해 공유


ISmsDevice.SmsMessageReceived 이벤트

정의

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

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)]
// Register
event_token SmsMessageReceived(SmsMessageReceivedEventHandler const& handler) const;

// Revoke with event_token
void SmsMessageReceived(event_token const* cookie) const;

// Revoke with event_revoker
ISmsDevice::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
ISmsDevice::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))]
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")]
event SmsMessageReceivedEventHandler SmsMessageReceived;
function onSmsMessageReceived(eventArgs) { /* Your code */ }
iSmsDevice.addEventListener("smsmessagereceived", onSmsMessageReceived);
iSmsDevice.removeEventListener("smsmessagereceived", onSmsMessageReceived);
- or -
iSmsDevice.onsmsmessagereceived = onSmsMessageReceived;
Event SmsMessageReceived As SmsMessageReceivedEventHandler 

이벤트 유형

특성

Windows 요구 사항

앱 기능
cellularMessaging sms

적용 대상