PushNotificationManager.PushReceived Evento

Definizione

Generato quando viene ricevuta una notifica push per l'app dalla piattaforma.

Nota

La classe PushNotificationManager ha una dipendenza dal pacchetto Singleton. A causa di tale dipendenza, esistono alcune considerazioni da tenere presente se si chiamano queste API da un'app autonoma. Per altre informazioni e specifiche, vedere Dipendenze su pacchetti MSIX aggiuntivi.

// 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) 

Tipo evento

Commenti

Per assicurarsi che il gestore eventi PushReceived venga chiamato all'interno del processo dell'app in esecuzione, assicurarsi di registrare il gestore per questo evento prima di chiamare Register. In caso contrario, verrà avviato un nuovo processo per gestire la notifica.

Si applica a