Ir a la consola

firebase::admob

API for AdMob with Firebase.

Summary

The AdMob API allows you to load and display mobile ads using the Google Mobile Ads SDK. Each ad format has its own header file.

Enumerations

AdMobError{
  kAdMobErrorNone,
  kAdMobErrorUninitialized,
  kAdMobErrorAlreadyInitialized,
  kAdMobErrorLoadInProgress,
  kAdMobErrorInternalError,
  kAdMobErrorInvalidRequest,
  kAdMobErrorNetworkError,
  kAdMobErrorNoFill,
  kAdMobErrorNoWindowToken
}
enum
Error codes returned by Future::error().
AdSizeType enum
Types of ad sizes.
ChildDirectedTreatmentState{
  kChildDirectedTreatmentStateUnknown = 0,
  kChildDirectedTreatmentStateTagged,
  kChildDirectedTreatmentStateNotTagged
}
enum
Indicates whether an ad request is considered tagged for child-directed treatment.
Gender{
  kGenderUnknown = 0,
  kGenderMale,
  kGenderFemale
}
enum
Gender information used as part of the firebase::admob::AdRequest struct.

Typedefs

AdParent typedef
void *
This is a platform specific datatype that is required to create an AdMob ad.

Functions

Initialize(const ::firebase::App & app)
Initializes AdMob via Firebase.
Initialize(const ::firebase::App & app, const char *admob_app_id)
Initializes AdMob via Firebase with the publisher's AdMob app ID.
Initialize(JNIEnv *jni_env, jobject activity)
Initializes AdMob without Firebase for Android.
Initialize(JNIEnv *jni_env, jobject activity, const char *admob_app_id)
Initializes AdMob via Firebase with the publisher's AdMob app ID.
Initialize()
Initializes AdMob without Firebase for iOS.
Initialize(const char *admob_app_id)
Initializes AdMob with the publisher's AdMob app ID and without Firebase for iOS.
Terminate()
void
Terminate AdMob.

Classes

firebase::admob::BannerView

Loads and displays AdMob banner ads.

firebase::admob::InterstitialAd

Loads and displays AdMob interstitial ads.

firebase::admob::NativeExpressAdView

Loads and displays ads from AdMob Native Ads Express.

Structs

firebase::admob::AdRequest

The information needed to request an ad.

firebase::admob::AdSize

An ad size value to be used in requesting ads.

firebase::admob::BoundingBox

The screen location and dimensions of an ad view once it has been initialized.

firebase::admob::KeyValuePair

Generic Key-Value container used for the "extras" values in an firebase::admob::AdRequest.

Namespaces

firebase::admob::rewarded_video

Loads and displays rewarded video ads via AdMob mediation.

Enumerations

AdMobError

 AdMobError

Error codes returned by Future::error().

Properties
kAdMobErrorAlreadyInitialized

The ad is already initialized (repeat call).

kAdMobErrorInternalError

A call to load an ad has failed due to an internal SDK error.

kAdMobErrorInvalidRequest

A call to load an ad has failed due to an invalid request.

kAdMobErrorLoadInProgress

A call has failed because an ad is currently loading.

kAdMobErrorNetworkError

A call to load an ad has failed due to a network error.

kAdMobErrorNoFill

A call to load an ad has failed because no ad was available to serve.

kAdMobErrorNoWindowToken

An attempt has been made to show an ad on an Android Activity that has no window token (such as one that's not done initializing).

kAdMobErrorNone

Call completed successfully.

kAdMobErrorUninitialized

The ad has not been fully initialized.

AdSizeType

 AdSizeType

Types of ad sizes.

ChildDirectedTreatmentState

 ChildDirectedTreatmentState

Indicates whether an ad request is considered tagged for child-directed treatment.

Properties
kChildDirectedTreatmentStateNotTagged

The request is not tagged for child-directed treatment.

kChildDirectedTreatmentStateTagged

The request is tagged for child-directed treatment.

kChildDirectedTreatmentStateUnknown

The child-directed status for the request is not indicated.

Gender

 Gender

Gender information used as part of the firebase::admob::AdRequest struct.

Properties
kGenderFemale

The current user is known to be female.

kGenderMale

The current user is known to be male.

kGenderUnknown

The gender of the current user is unknown or unspecified by the publisher.

Typedefs

AdParent

void * AdParent

This is a platform specific datatype that is required to create an AdMob ad.

The following defines the datatype on each platform:

  • Android: A jobject which references an Android Activity.
  • iOS: An id which references an iOS UIView.