java.lang.Object | |
↳ | com.google.android.gms.ads.MobileAds |
Class contains logic that applies to the Mobile Ads SDK as a whole. Right now, the only methods in it are used for initialization.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
MobileAds.Settings | This class describes all optional initialization settings that impact the Google Mobile Ads SDK's behavior. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Get the rewarded video ad instance.
| |||||||||||
Initialize the Mobile Ads SDK.
| |||||||||||
Initialize the Mobile Ads SDK.
| |||||||||||
Initialize the Mobile Ads SDK.
| |||||||||||
Open the debug menu for creative preview and troubleshooting of DFP ad units.
| |||||||||||
Set the current app mute state.
| |||||||||||
Set the current app volume.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Get the rewarded video ad instance.
Parameters | |
---|---|
context |
Context :
The Context the SDK is running in.
|
Returns | |
---|---|
RewardedVideoAd |
Initialize the Mobile Ads SDK. The SDK will configure itself.
This method should be called as early as possible, and only once per application launch.
Parameters | |
---|---|
context |
Context :
The Context the SDK is running in. |
applicationCode |
String :
The AdMob application code.
|
Initialize the Mobile Ads SDK. The SDK will configure itself.
This method should be called as early as possible, and only once per application launch.
Parameters | |
---|---|
context |
Context :
The Context the SDK is running in.
|
Initialize the Mobile Ads SDK. The SDK will configure itself and initialize integrated features such as Google Analytics.
This method should be called as early as possible, and only once per application launch.
Parameters | |
---|---|
context |
Context :
The Context the SDK is running in. |
applicationCode |
String :
The AdMob application code. |
settings |
MobileAds.Settings :
Additional settings for initializing the Mobile Ads SDK.
|
Open the debug menu for creative preview and troubleshooting of DFP ad units. initialize(Context)
must be called prior to this function.
Parameters | |
---|---|
context |
Context :
The activity Context the SDK is running in. |
adUnitId |
String :
the DFP ad unit ID of the ad to preview or troubleshoot with
|
Set the current app mute state.
Parameters | |
---|---|
muted |
boolean :
true if the app is muted, false otherwise
|
Set the current app volume.
Parameters | |
---|---|
volume |
float :
the volume as a float from 0 (muted) to 1 (full media volume) |
Throws | |
---|---|
IllegalArgumentException |
if volume is out of the valid range |