BackgroundTaskRegistrationGroup.BackgroundActivated イベント

定義

このイベントは、グループに属するバックグラウンド タスクが開始されたときに発生します。

// Register
event_token BackgroundActivated(TypedEventHandler<BackgroundTaskRegistrationGroup, BackgroundActivatedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
BackgroundTaskRegistrationGroup::BackgroundActivated_revoker BackgroundActivated(auto_revoke_t, TypedEventHandler<BackgroundTaskRegistrationGroup, BackgroundActivatedEventArgs const&> const& handler) const;
public event TypedEventHandler<BackgroundTaskRegistrationGroup,BackgroundActivatedEventArgs> BackgroundActivated;
function onBackgroundActivated(eventArgs) { /* Your code */ }
backgroundTaskRegistrationGroup.addEventListener("backgroundactivated", onBackgroundActivated);
backgroundTaskRegistrationGroup.removeEventListener("backgroundactivated", onBackgroundActivated);
- or -
backgroundTaskRegistrationGroup.onbackgroundactivated = onBackgroundActivated;
Public Custom Event BackgroundActivated As TypedEventHandler(Of BackgroundTaskRegistrationGroup, BackgroundActivatedEventArgs) 

イベントの種類

バックグラウンド アクティブ化のサンプル グループ化されたタスクの例については、シナリオ 6 を参照してください。

注釈

グループに関連付けられているバックグラウンド トリガーは、タスク エントリ ポイントを持つ代わりに、このイベントを発生させます。 バックグラウンド タスク登録でエントリ ポイントを定義しない単一プロセスバックグラウンド タスクの場合、このイベントはエントリ ポイントです。 アプリケーションの OnBackgroundActivated メソッドを呼び出す代わりに、グループにアタッチされているイベントが呼び出されます。

適用対象

こちらもご覧ください