Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GMA C++ deprecation notice #1613

Merged
merged 6 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions gma/src/include/firebase/gma.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ class Future {
///
/// The GMA API allows you to load and display mobile ads using the Google
/// Mobile Ads SDK. Each ad format has its own header file.
///
/// @deprecated The Google Mobile Ads C++ SDK is now deprecated. Please see
/// https://developers.google.com/admob/cpp/sdk for more information.
namespace gma {

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

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

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

Expand Down
12 changes: 8 additions & 4 deletions gma/src/include/firebase/gma/ad_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ struct BoundingBox;
/// ad_view->LoadAd(your_ad_request);
/// }
/// @endcode
///
/// @deprecated The Google Mobile Ads C++ SDK is now deprecated. Please see
/// https://developers.google.com/admob/cpp/sdk for more information.
class AdView {
public:
/// The possible screen positions for a @ref AdView, configured via
Expand All @@ -86,20 +89,21 @@ class AdView {

/// Creates an uninitialized @ref AdView object.
/// @ref Initialize must be called before the object is used.
AdView();
FIREBASE_DEPRECATED AdView();

~AdView();

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

/// Returns a @ref Future that has the status of the last call to
/// @ref Initialize.
Future<void> InitializeLastResult() const;
FIREBASE_DEPRECATED Future<void> InitializeLastResult() const;

/// Begins an asynchronous request for an ad. If successful, the ad will
/// automatically be displayed in the AdView.
Expand Down
9 changes: 6 additions & 3 deletions gma/src/include/firebase/gma/interstitial_ad.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,24 @@ class InterstitialAdInternal;
/// interstitial->Show();
/// }
/// @endcode
///
/// @deprecated The Google Mobile Ads C++ SDK is now deprecated. Please see
/// https://developers.google.com/admob/cpp/sdk for more information.
class InterstitialAd {
public:
/// Creates an uninitialized @ref InterstitialAd object.
/// @ref Initialize must be called before the object is used.
InterstitialAd();
FIREBASE_DEPRECATED InterstitialAd();

~InterstitialAd();

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

/// Returns a @ref Future containing the status of the last call to
/// @ref Initialize.
Future<void> InitializeLastResult() const;
FIREBASE_DEPRECATED Future<void> InitializeLastResult() const;

/// Begins an asynchronous request for an ad.
///
Expand Down
9 changes: 6 additions & 3 deletions gma/src/include/firebase/gma/rewarded_ad.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ class RewardedAdInternal;
/// rewarded->Show(&my_user_earned_reward_listener);
/// }
/// @endcode
///
/// @deprecated The Google Mobile Ads C++ SDK is now deprecated. Please see
/// https://developers.google.com/admob/cpp/sdk for more information.
class RewardedAd {
public:
/// Options for RewardedAd server-side verification callbacks. Set options on
Expand All @@ -86,17 +89,17 @@ class RewardedAd {

/// Creates an uninitialized @ref RewardedAd object.
/// @ref Initialize must be called before the object is used.
RewardedAd();
FIREBASE_DEPRECATED RewardedAd();

~RewardedAd();

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

/// Returns a @ref Future containing the status of the last call to
/// @ref Initialize.
Future<void> InitializeLastResult() const;
FIREBASE_DEPRECATED Future<void> InitializeLastResult() const;

/// Begins an asynchronous request for an ad.
///
Expand Down
4 changes: 3 additions & 1 deletion release_build_files/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,9 @@ code.
- Analytics (iOS): Add support for
`InitiateOnDeviceConversionMeasurementWithHashedEmailAddress` and
`InitiateOnDeviceConversionMeasurementWithHashedPhoneNumber`.
- Messaging (Android): Addressed potential race condition on receiving
- GMA: The GMA C++ SDK is now deprecated. For more information, see the
[SDK documentation](https://developers.google.com/admob/cpp/sdk).
- Messaging (Android): Fixed a potential race condition on receiving
messages after cleanup.

### 12.0.0
Expand Down
Loading