Skip to content

Commit 53d1d13

Browse files
authored
Add GMA C++ deprecation notice (#1613)
* Add deprecation warning to GMA initialization method. * Add deprecation notices to the headers. * Format code. * Add release note about GMA SDK. * Rephrase slightly.
1 parent a1c59e0 commit 53d1d13

File tree

5 files changed

+38
-14
lines changed

5 files changed

+38
-14
lines changed

gma/src/include/firebase/gma.h

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ class Future {
6161
///
6262
/// The GMA API allows you to load and display mobile ads using the Google
6363
/// Mobile Ads SDK. Each ad format has its own header file.
64+
///
65+
/// @deprecated The Google Mobile Ads C++ SDK is now deprecated. Please see
66+
/// https://developers.google.com/admob/cpp/sdk for more information.
6467
namespace gma {
6568

6669
/// Initializes Google Mobile Ads (GMA) via Firebase.
@@ -78,7 +81,10 @@ namespace gma {
7881
/// @return If init_result_out is kInitResultSuccess, this Future will contain
7982
/// the initialization status of each adapter once initialization is complete.
8083
/// Otherwise, the returned Future will have kFutureStatusInvalid.
81-
Future<AdapterInitializationStatus> Initialize(
84+
///
85+
/// @deprecated The Google Mobile Ads C++ SDK is now deprecated. Please see
86+
/// https://developers.google.com/admob/cpp/sdk for more information.
87+
FIREBASE_DEPRECATED Future<AdapterInitializationStatus> Initialize(
8288
const ::firebase::App& app, InitResult* init_result_out = nullptr);
8389

8490
#if FIREBASE_PLATFORM_ANDROID || defined(DOXYGEN)
@@ -107,7 +113,10 @@ Future<AdapterInitializationStatus> Initialize(
107113
/// @return If init_result_out is kInitResultSuccess, this Future will contain
108114
/// the initialization status of each adapter once initialization is complete.
109115
/// Otherwise, the returned Future will have kFutureStatusInvalid.
110-
Future<AdapterInitializationStatus> Initialize(
116+
///
117+
/// @deprecated The Google Mobile Ads C++ SDK is now deprecated. Please see
118+
/// https://developers.google.com/admob/cpp/sdk for more information.
119+
FIREBASE_DEPRECATED Future<AdapterInitializationStatus> Initialize(
111120
JNIEnv* jni_env, jobject activity, InitResult* init_result_out = nullptr);
112121

113122
#endif // defined(__ANDROID__) || defined(DOXYGEN)
@@ -126,7 +135,10 @@ Future<AdapterInitializationStatus> Initialize(
126135
/// will contain the initialization status of each adapter once initialization
127136
/// is complete. Otherwise, the returned Future will have
128137
/// <code>kFutureStatusInvalid</code>.
129-
Future<AdapterInitializationStatus> Initialize(
138+
///
139+
/// @deprecated The Google Mobile Ads C++ SDK is now deprecated. Please see
140+
/// https://developers.google.com/admob/cpp/sdk for more information.
141+
FIREBASE_DEPRECATED Future<AdapterInitializationStatus> Initialize(
130142
InitResult* init_result_out = nullptr);
131143
#endif // !defined(__ANDROID__) || defined(DOXYGEN)
132144

gma/src/include/firebase/gma/ad_view.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ struct BoundingBox;
6363
/// ad_view->LoadAd(your_ad_request);
6464
/// }
6565
/// @endcode
66+
///
67+
/// @deprecated The Google Mobile Ads C++ SDK is now deprecated. Please see
68+
/// https://developers.google.com/admob/cpp/sdk for more information.
6669
class AdView {
6770
public:
6871
/// The possible screen positions for a @ref AdView, configured via
@@ -86,20 +89,21 @@ class AdView {
8689

8790
/// Creates an uninitialized @ref AdView object.
8891
/// @ref Initialize must be called before the object is used.
89-
AdView();
92+
FIREBASE_DEPRECATED AdView();
9093

9194
~AdView();
9295

9396
/// Initializes the @ref AdView object.
9497
/// @param[in] parent The platform-specific UI element that will host the ad.
9598
/// @param[in] ad_unit_id The ad unit ID to use when requesting ads.
9699
/// @param[in] size The desired ad size for the ad.
97-
Future<void> Initialize(AdParent parent, const char* ad_unit_id,
98-
const AdSize& size);
100+
FIREBASE_DEPRECATED Future<void> Initialize(AdParent parent,
101+
const char* ad_unit_id,
102+
const AdSize& size);
99103

100104
/// Returns a @ref Future that has the status of the last call to
101105
/// @ref Initialize.
102-
Future<void> InitializeLastResult() const;
106+
FIREBASE_DEPRECATED Future<void> InitializeLastResult() const;
103107

104108
/// Begins an asynchronous request for an ad. If successful, the ad will
105109
/// automatically be displayed in the AdView.

gma/src/include/firebase/gma/interstitial_ad.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,21 +69,24 @@ class InterstitialAdInternal;
6969
/// interstitial->Show();
7070
/// }
7171
/// @endcode
72+
///
73+
/// @deprecated The Google Mobile Ads C++ SDK is now deprecated. Please see
74+
/// https://developers.google.com/admob/cpp/sdk for more information.
7275
class InterstitialAd {
7376
public:
7477
/// Creates an uninitialized @ref InterstitialAd object.
7578
/// @ref Initialize must be called before the object is used.
76-
InterstitialAd();
79+
FIREBASE_DEPRECATED InterstitialAd();
7780

7881
~InterstitialAd();
7982

8083
/// Initialize the @ref InterstitialAd object.
8184
/// @param[in] parent The platform-specific UI element that will host the ad.
82-
Future<void> Initialize(AdParent parent);
85+
FIREBASE_DEPRECATED Future<void> Initialize(AdParent parent);
8386

8487
/// Returns a @ref Future containing the status of the last call to
8588
/// @ref Initialize.
86-
Future<void> InitializeLastResult() const;
89+
FIREBASE_DEPRECATED Future<void> InitializeLastResult() const;
8790

8891
/// Begins an asynchronous request for an ad.
8992
///

gma/src/include/firebase/gma/rewarded_ad.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ class RewardedAdInternal;
7171
/// rewarded->Show(&my_user_earned_reward_listener);
7272
/// }
7373
/// @endcode
74+
///
75+
/// @deprecated The Google Mobile Ads C++ SDK is now deprecated. Please see
76+
/// https://developers.google.com/admob/cpp/sdk for more information.
7477
class RewardedAd {
7578
public:
7679
/// Options for RewardedAd server-side verification callbacks. Set options on
@@ -86,17 +89,17 @@ class RewardedAd {
8689

8790
/// Creates an uninitialized @ref RewardedAd object.
8891
/// @ref Initialize must be called before the object is used.
89-
RewardedAd();
92+
FIREBASE_DEPRECATED RewardedAd();
9093

9194
~RewardedAd();
9295

9396
/// Initialize the @ref RewardedAd object.
9497
/// @param[in] parent The platform-specific UI element that will host the ad.
95-
Future<void> Initialize(AdParent parent);
98+
FIREBASE_DEPRECATED Future<void> Initialize(AdParent parent);
9699

97100
/// Returns a @ref Future containing the status of the last call to
98101
/// @ref Initialize.
99-
Future<void> InitializeLastResult() const;
102+
FIREBASE_DEPRECATED Future<void> InitializeLastResult() const;
100103

101104
/// Begins an asynchronous request for an ad.
102105
///

release_build_files/readme.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,9 @@ code.
638638
- Analytics (iOS): Add support for
639639
`InitiateOnDeviceConversionMeasurementWithHashedEmailAddress` and
640640
`InitiateOnDeviceConversionMeasurementWithHashedPhoneNumber`.
641-
- Messaging (Android): Addressed potential race condition on receiving
641+
- GMA: The GMA C++ SDK is now deprecated. For more information, see the
642+
[SDK documentation](https://developers.google.com/admob/cpp/sdk).
643+
- Messaging (Android): Fixed a potential race condition on receiving
642644
messages after cleanup.
643645

644646
### 12.0.0

0 commit comments

Comments
 (0)