@@ -36,23 +36,43 @@ FIREBASE_APP_REGISTER_CALLBACKS_REFERENCE(admob)
3636
3737namespace firebase {
3838
39+ // / @deprecated The functionality in the <code>firebase::admob</code> namespace
40+ // / has been replaced by the Google Mobile Ads SDK in the
41+ // / <code>firebase::gma</code> namespace. Learn how to transition to the new
42+ // / SDK in our <a href="/docs/admob/cpp/admob-migration">migration guide</a>.
43+ // /
3944// / @brief API for AdMob with Firebase.
4045// /
4146// / The AdMob API allows you to load and display mobile ads using the Google
4247// / Mobile Ads SDK. Each ad format has its own header file.
4348namespace admob {
4449
45- // / Initializes AdMob via Firebase.
50+ // / @deprecated
51+ // / @brief Initializes AdMob via Firebase.
52+ // /
53+ // / The functionality in the <code>firebase::admob</code> namespace has
54+ // / been replaced by the Google Mobile Ads SDK in the
55+ // / <code>firebase::gma</code> namespace. Learn how to transition to the
56+ // / new SDK in our <a href="/docs/admob/cpp/admob-migration">migration
57+ // / guide</a>.
4658// /
4759// / @param app The Firebase app for which to initialize mobile ads.
4860// /
4961// / @return kInitResultSuccess if initialization succeeded, or
5062// / kInitResultFailedMissingDependency on Android if Google Play services is not
5163// / available on the current device and the Google Mobile Ads SDK requires
5264// / Google Play services (for example, when using 'play-services-ads-lite').
53- InitResult Initialize (const ::firebase::App& app);
65+ FIREBASE_DEPRECATED InitResult Initialize (const ::firebase::App& app);
5466
55- // / Initializes AdMob via Firebase with the publisher's AdMob app ID.
67+ // / @deprecated
68+ // / @brief Initializes AdMob via Firebase with the publisher's AdMob app ID.
69+ // /
70+ // / The functionality in the <code>firebase::admob</code> namespace has
71+ // / been replaced by the Google Mobile Ads SDK in the
72+ // / <code>firebase::gma</code> namespace. Learn how to transition to the
73+ // / new SDK in our <a href="/docs/admob/cpp/admob-migration">migration
74+ // / guide</a>.
75+ // /
5676// / Initializing the Google Mobile Ads SDK with the AdMob app ID at app launch
5777// / allows the SDK to fetch app-level settings and perform configuration tasks
5878// / as early as possible. This can help reduce latency for the initial ad
@@ -69,10 +89,18 @@ InitResult Initialize(const ::firebase::App& app);
6989// / kInitResultFailedMissingDependency on Android if Google Play services is not
7090// / available on the current device and the Google Mobile Ads SDK requires
7191// / Google Play services (for example, when using 'play-services-ads-lite').
72- InitResult Initialize (const ::firebase::App& app, const char * admob_app_id);
92+ FIREBASE_DEPRECATED InitResult Initialize (const ::firebase::App& app,
93+ const char * admob_app_id);
7394
7495#if FIREBASE_PLATFORM_ANDROID || defined(DOXYGEN)
75- // / Initializes AdMob without Firebase for Android.
96+ // / @deprecated
97+ // / @brief Initializes AdMob without Firebase for Android.
98+ // /
99+ // / The functionality in the <code>firebase::admob</code> namespace has
100+ // / been replaced by the Google Mobile Ads SDK in the
101+ // / <code>firebase::gma</code> namespace. Learn how to transition to the
102+ // / new SDK in our <a href="/docs/admob/cpp/admob-migration">migration
103+ // / guide</a>.
76104// /
77105// / The arguments to @ref Initialize are platform-specific so the caller must do
78106// / something like this:
@@ -91,9 +119,17 @@ InitResult Initialize(const ::firebase::App& app, const char* admob_app_id);
91119// / kInitResultFailedMissingDependency on Android if Google Play services is not
92120// / available on the current device and the AdMob SDK requires
93121// / Google Play services (for example when using 'play-services-ads-lite').
94- InitResult Initialize (JNIEnv* jni_env, jobject activity);
122+ FIREBASE_DEPRECATED InitResult Initialize (JNIEnv* jni_env, jobject activity);
95123
96- // / Initializes AdMob via Firebase with the publisher's AdMob app ID.
124+ // / @deprecated
125+ // / @brief Initializes AdMob via Firebase with the publisher's AdMob app ID.
126+ // /
127+ // / The functionality in the <code>firebase::admob</code> namespace has
128+ // / been replaced by the Google Mobile Ads SDK in the
129+ // / <code>firebase::gma</code> namespace. Learn how to transition to the
130+ // / new SDK in our <a href="/docs/admob/cpp/admob-migration">migration
131+ // / guide</a>.
132+ // /
97133// / Initializing the Google Mobile Ads SDK with the AdMob app ID at app launch
98134// / allows the SDK to fetch app-level settings and perform configuration tasks
99135// / as early as possible. This can help reduce latency for the initial ad
@@ -121,15 +157,30 @@ InitResult Initialize(JNIEnv* jni_env, jobject activity);
121157// / kInitResultFailedMissingDependency on Android if Google Play services is not
122158// / available on the current device and the AdMob SDK requires
123159// / Google Play services (for example when using 'play-services-ads-lite').
124- InitResult Initialize (JNIEnv* jni_env, jobject activity,
125- const char * admob_app_id);
160+ FIREBASE_DEPRECATED InitResult Initialize (JNIEnv* jni_env, jobject activity,
161+ const char * admob_app_id);
126162#endif // defined(__ANDROID__) || defined(DOXYGEN)
127163#if !FIREBASE_PLATFORM_ANDROID || defined(DOXYGEN)
128- // / Initializes AdMob without Firebase for iOS.
129- InitResult Initialize ();
164+ // / @deprecated
165+ // / @brief Initializes AdMob without Firebase for iOS.
166+ // /
167+ // / The functionality in the <code>firebase::admob</code> namespace has
168+ // / been replaced by the Google Mobile Ads SDK in the
169+ // / <code>firebase::gma</code> namespace. Learn how to transition to the
170+ // / new SDK in our <a href="/docs/admob/cpp/admob-migration">migration
171+ // / guide</a>.
172+ FIREBASE_DEPRECATED InitResult Initialize ();
130173
131- // / Initializes AdMob with the publisher's AdMob app ID and without Firebase for
132- // / iOS.
174+ // / @deprecated
175+ // / @brief Initializes AdMob with the publisher's AdMob app ID and without
176+ // / Firebase for iOS.
177+ // /
178+ // / The functionality in the <code>firebase::admob</code> namespace has
179+ // / been replaced by the Google Mobile Ads SDK in the
180+ // / <code>firebase::gma</code> namespace. Learn how to transition to the
181+ // / new SDK in our <a href="/docs/admob/cpp/admob-migration">migration
182+ // / guide</a>.
183+ // /
133184// / Initializing the Google Mobile Ads SDK with the AdMob app ID at app launch
134185// / allows the SDK to fetch app-level settings and perform configuration tasks
135186// / as early as possible. This can help reduce latency for the initial ad
@@ -142,14 +193,21 @@ InitResult Initialize();
142193// / @param[in] admob_app_id The publisher's AdMob app ID.
143194// /
144195// / @return kInitResultSuccess if initialization succeeded
145- InitResult Initialize (const char * admob_app_id);
196+ FIREBASE_DEPRECATED InitResult Initialize (const char * admob_app_id);
146197#endif // !defined(__ANDROID__) || defined(DOXYGEN)
147198
199+ // / @deprecated
148200// / @brief Terminate AdMob.
149201// /
202+ // / The functionality in the <code>firebase::admob</code> namespace has
203+ // / been replaced by the Google Mobile Ads SDK in the
204+ // / <code>firebase::gma</code> namespace. Learn how to transition to the
205+ // / new SDK in our <a href="/docs/admob/cpp/admob-migration">migration
206+ // / guide</a>.
207+ // /
150208// / Frees resources associated with AdMob that were allocated during
151209// / @ref firebase::admob::Initialize().
152- void Terminate ();
210+ FIREBASE_DEPRECATED void Terminate ();
153211
154212} // namespace admob
155213} // namespace firebase
0 commit comments