AppBroadcastBackgroundService.HeartbeatRequested Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Raised by the system periodically to confirm that the broadcasting background task is currently active.
// Register
event_token HeartbeatRequested(TypedEventHandler<AppBroadcastBackgroundService, AppBroadcastHeartbeatRequestedEventArgs const&> const& handler) const;
// Revoke with event_token
void HeartbeatRequested(event_token const* cookie) const;
// Revoke with event_revoker
AppBroadcastBackgroundService::HeartbeatRequested_revoker HeartbeatRequested(auto_revoke_t, TypedEventHandler<AppBroadcastBackgroundService, AppBroadcastHeartbeatRequestedEventArgs const&> const& handler) const;
public event TypedEventHandler<AppBroadcastBackgroundService,AppBroadcastHeartbeatRequestedEventArgs> HeartbeatRequested;
function onHeartbeatRequested(eventArgs) { /* Your code */ }
appBroadcastBackgroundService.addEventListener("heartbeatrequested", onHeartbeatRequested);
appBroadcastBackgroundService.removeEventListener("heartbeatrequested", onHeartbeatRequested);
- or -
appBroadcastBackgroundService.onheartbeatrequested = onHeartbeatRequested;
Public Custom Event HeartbeatRequested As TypedEventHandler(Of AppBroadcastBackgroundService, AppBroadcastHeartbeatRequestedEventArgs)
Event Type
Windows requirements
App capabilities |
appBroadcast
appBroadcastSettings
|
Remarks
Set the Handled property to true to confirm that the background task is currently active. Failure to respond to this event and set the Handled property to true can result in the background task for the broadcast app being terminated.
Applies to
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin