Stay organized with collections
Save and categorize content based on your preferences.
GoogleMobileAds.Api.AppStateEventNotifier
Notifies changes in app foreground/background.
Summary
Subscribe to AppStateEventNotifier.AppStateChanged to get notified of changes in AppState.
Properties
|
AppStateChanged
|
static Action< AppState >
Raised when the app enters the background/foreground.
|
Properties
AppStateChanged
static Action< AppState > AppStateChanged
Raised when the app enters the background/foreground.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[null,null,["Last updated 2025-08-20 UTC."],[[["\u003cp\u003eGoogleMobileAds.Api.AppStateEventNotifier provides notifications about changes in the application's foreground and background states.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can subscribe to the AppStateChanged event to receive updates when the app transitions between foreground and background.\u003c/p\u003e\n"],["\u003cp\u003eAppStateEventNotifier helps manage ad behavior and other app functionalities based on the app's current state.\u003c/p\u003e\n"]]],["The `AppStateEventNotifier` monitors app state changes between foreground and background. Key action: Subscribe to the `AppStateChanged` event. This static event, of type `Action\u003cAppState\u003e`, is triggered whenever the app's state shifts. The `AppStateChanged` property notifies subscribers when the app moves into or out of the foreground.\n"],null,["# GoogleMobileAds.Api.AppStateEventNotifier Class Reference\n\nGoogleMobileAds.Api.AppStateEventNotifier\n=========================================\n\nNotifies changes in app foreground/background.\n\nSummary\n-------\n\nSubscribe to [AppStateEventNotifier.AppStateChanged](/admob/unity/reference/class/google-mobile-ads/api/app-state-event-notifier#class_google_mobile_ads_1_1_api_1_1_app_state_event_notifier_1a02bfd5356a5bb76c3eb23d469b694613) to get notified of changes in AppState.\n\n| ### Properties ||\n|---------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|\n| [AppStateChanged](#class_google_mobile_ads_1_1_api_1_1_app_state_event_notifier_1a02bfd5356a5bb76c3eb23d469b694613) | `static Action\u003c AppState \u003e` Raised when the app enters the background/foreground. |\n\nProperties\n----------\n\n### AppStateChanged\n\n```c#\nstatic Action\u003c AppState \u003e AppStateChanged\n``` \nRaised when the app enters the background/foreground."]]