public static final class

MobileAds.Settings

extends Object
java.lang.Object
   ↳ com.google.android.gms.ads.MobileAds.Settings

Class Overview

This class describes all optional initialization settings that impact the Google Mobile Ads SDK's behavior.

Summary

Public Constructors
MobileAds.Settings()
Public Methods
String getTrackingId()
Return the tracking Id set by setTrackingId(String).
boolean isGoogleAnalyticsEnabled()
Return true if Google Analytics is enabled.
MobileAds.Settings setGoogleAnalyticsEnabled(boolean enable)
Set whether or not to enable Google Analytics.
MobileAds.Settings setTrackingId(String trackingId)
Set a tracking Id provided by Google Analytics.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public MobileAds.Settings ()

Public Methods

public String getTrackingId ()

Return the tracking Id set by setTrackingId(String). Returns null if it is not set.

Returns
String

public boolean isGoogleAnalyticsEnabled ()

Return true if Google Analytics is enabled.

Returns
boolean

public MobileAds.Settings setGoogleAnalyticsEnabled (boolean enable)

Set whether or not to enable Google Analytics.

Parameters
enable boolean
Returns
MobileAds.Settings

public MobileAds.Settings setTrackingId (String trackingId)

Set a tracking Id provided by Google Analytics. The tracking Id should match the format UA-XXXXXXXX-X

Parameters
trackingId String
Returns
MobileAds.Settings