gma::
Information about why an ad operation failed.
Listener to be invoked when the Ad Inspector has been closed.
A listener for receiving notifications during the lifecycle of a BannerAd.
Contains targeting information used to fetch an ad.
Information about the result of an ad operation.
Describes a reward credited to a user for interacting with a RewardedAd.
The size of a banner ad.
The monetary value earned from an ad.
Loads and displays Google Mobile Ads AdView ads.
A listener class that developers can extend and pass to an AdView object's AdView::SetBoundingBoxListener method to be notified of changes to the size of the Ad's bounding box.
An immutable snapshot of the GMA SDK’s initialization status, categorized by mediation adapter.
Response information for an individual ad network contained within a ResponseInfo object.
A snapshot of a mediation adapter's initialization status.
Listener to be invoked when ads show and dismiss full screen content, such as a fullscreen ad experience or an in-app browser.
Loads and displays Google Mobile Ads interstitial ads.
Listener to be invoked when ads have been estimated to earn money.
Information about an ad response.
Loads and displays Google Mobile Ads rewarded ads.
Listener to be invoked when the user earned a reward.
Structs | |
---|---|
firebase:: | The screen location and dimensions of an AdView once it has been initialized. |
firebase:: | Global configuration that will be used for every AdRequest. |
Namespaces | |
---|---|
firebase:: | API for User Messaging Platform. |
AdErrorCode
Error codes returned by Future::error().
void*AdParent
This is a platform specific datatype that is required to create a Google Mobile Ads ad.
The following defines the datatype on each platform:
jobject
which references an Android Activity. id
which references an iOS UIView. voidDisableMediationInitialization()
Disables mediation adapter initialization on iOS during initialization of the GMA SDK.
Calling this method may negatively impact your ad performance and should only be called if you will not use GMA SDK controlled mediation during this app session. This method must be called before initializing the GMA SDK or loading ads and has no effect once the SDK has been initialized.
This method has no effect on Android.
voidDisableSDKCrashReporting()
Disables automated SDK crash reporting on iOS.
If not called, the SDK records the original exception handler if available and registers a new exception handler. The new exception handler only reports SDK related exceptions and calls the recorded original exception handler.
This method has no effect on Android.
AdapterInitializationStatusGetInitializationStatus()
Get the current adapter initialization status.
You can poll this method to check which adapters have been initialized.
RequestConfigurationGetRequestConfiguration()
Gets the global RequestConfiguration.
Details | |
---|---|
Returns | the currently active RequestConfiguration that's being used for every ad request. |
Future<AdapterInitializationStatus>Initialize(const::firebase::App&app,InitResult*init_result_out)
Initializes Google Mobile Ads (GMA) via Firebase.
Deprecated. The Google Mobile Ads C++ SDK is now deprecated. Please see the SDK reference documentation for more information.
Details | |||||
---|---|---|---|---|---|
Parameters |
| ||||
Returns |
Future<AdapterInitializationStatus>Initialize(JNIEnv*jni_env,jobjectactivity,InitResult*init_result_out)
Initializes Google Mobile Ads (GMA) without Firebase for Android.
The arguments to Initialize are platform-specific so the caller must do something like this:
#if defined(__ANDROID__)firebase::gma::Initialize(jni_env,activity);#elsefirebase::gma::Initialize();#endif
Deprecated. The Google Mobile Ads C++ SDK is now deprecated. Please see https://developers.google.com/admob/cpp/reference/namespace/firebase/gma for more information.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
| ||||||
Returns |
Future<AdapterInitializationStatus>Initialize(InitResult*init_result_out)
Initializes Google Mobile Ads (GMA) without Firebase for iOS.
Deprecated. The Google Mobile Ads C++ SDK is now deprecated. Please see https://developers.google.com/admob/cpp/reference/namespace/firebase/gma for more information.
Details | |||
---|---|---|---|
Parameters |
| ||
Returns |
Future<AdapterInitializationStatus>InitializeLastResult()
Get the Future returned by a previous call to firebase::gma::Initialize().
voidOpenAdInspector(AdParentparent,AdInspectorClosedListener*listener)
Opens the ad inspector UI.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
voidSetIsSameAppKeyEnabled(boolis_enabled)
Controls whether the Google Mobile Ads SDK Same App Key is enabled.
This function must be invoked after GMA has been initialized. The value set persists across app sessions. The key is enabled by default.
This operation is supported on iOS only. This is a no-op on Android systems.
Details | |||
---|---|---|---|
Parameters |
|
voidSetRequestConfiguration(constRequestConfiguration&request_configuration)
Sets the global RequestConfiguration that will be used for every AdRequest during the app's session.
Details | |||
---|---|---|---|
Parameters |
|
voidTerminate()
Terminate GMA.
Frees resources associated with GMA that were allocated during firebase::gma::Initialize().
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 2024-09-26 UTC.