Yandex Mobile Ads
Loading...
Searching...
No Matches
AppStateObserver.cs
Go to the documentation of this file.
1/*
2 * This file is a part of the Yandex Advertising Network
3 *
4 * Version for Android (C) 2023 YANDEX
5 *
6 * You may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at https://legal.yandex.com/partner_ch/
8 */
9
10using System;
12using YandexMobileAds.Common;
13using YandexMobileAds.Platforms;
14
15namespace YandexMobileAds
16{
17 internal class AppStateObserver
18 {
19 public static event EventHandler<AppStateChangedEventArgs> OnAppStateChanged
20 {
21 add { _client.OnAppStateChanged += value; }
22 remove { _client.OnAppStateChanged -= value; }
23 }
24
25 private static readonly IAppStateObserverClient _client;
26
27 static AppStateObserver()
28 {
29 _client = YandexMobileAdsClientFactory.BuildAppStateObserverClient();
30 }
31 }
32}