다음을 통해 공유


PushNotificationManager.PushReceived 이벤트

정의

플랫폼에서 앱에 대한 푸시 알림을 수신할 때 발생합니다.

참고

PushNotificationManager 클래스는 Singleton 패키지에 종속됩니다. 이러한 종속성 때문에 자체 포함 앱에서 이러한 API를 호출하는 경우 주의해야 할 특정 고려 사항이 있습니다. 자세한 정보 및 세부 정보는 추가 MSIX 패키지에 대한 종속성을 참조하세요.

// Register
event_token PushReceived(TypedEventHandler<PushNotificationManager, PushNotificationReceivedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
PushNotificationManager::PushReceived_revoker PushReceived(auto_revoke_t, TypedEventHandler<PushNotificationManager, PushNotificationReceivedEventArgs const&> const& handler) const;
public event TypedEventHandler<PushNotificationManager,PushNotificationReceivedEventArgs> PushReceived;
function onPushReceived(eventArgs) { /* Your code */ }
pushNotificationManager.addEventListener("pushreceived", onPushReceived);
pushNotificationManager.removeEventListener("pushreceived", onPushReceived);
- or -
pushNotificationManager.onpushreceived = onPushReceived;
Public Custom Event PushReceived As TypedEventHandler(Of PushNotificationManager, PushNotificationReceivedEventArgs) 

이벤트 유형

설명

실행 중인 앱의 프로세스 내에서 PushReceived 이벤트 처리기가 호출되도록 하려면 Register를 호출하기 전에 이 이벤트에 대한 처리기를 등록해야 합니다. 그렇지 않으면 알림을 처리하기 위해 새 프로세스가 시작됩니다.

적용 대상