java.lang.Object | |
↳ | com.google.android.gms.ads.doubleclick.PublisherAdRequest |
A PublisherAdRequest
contains targeting information used to fetch an ad from DoubleClick
for Publishers. Ad requests are created using PublisherAdRequest.Builder
.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PublisherAdRequest.Builder | Builds a PublisherAdRequest . |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | DEVICE_ID_EMULATOR | The deviceId for emulators to be used with addTestDevice(String) . |
|||||||||
int | ERROR_CODE_INTERNAL_ERROR | Something happened internally; for instance, an invalid response was received from the ad server. | |||||||||
int | ERROR_CODE_INVALID_REQUEST | The ad request was invalid; for instance, the ad unit ID was incorrect. | |||||||||
int | ERROR_CODE_NETWORK_ERROR | The ad request was unsuccessful due to network connectivity. | |||||||||
int | ERROR_CODE_NO_FILL | The ad request was successful, but no ad was returned due to lack of ad inventory. | |||||||||
int | GENDER_FEMALE | Female gender. | |||||||||
int | GENDER_MALE | Male gender. | |||||||||
int | GENDER_UNKNOWN | Unknown gender. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the user's birthday targeting information.
| |||||||||||
Returns the content url targeting information.
| |||||||||||
Returns extra parameters to pass to a specific custom event adapter.
| |||||||||||
Returns the custom targeting parameters.
| |||||||||||
Returns the user's gender targeting information.
| |||||||||||
Returns targeting information keywords.
| |||||||||||
Returns the user's location targeting information.
| |||||||||||
Returns
true if manual impression reporting is enabled. | |||||||||||
Returns extra parameters to pass to a specific ad network adapter.
| |||||||||||
Returns extra parameters to pass to a specific ad network adapter.
| |||||||||||
Returns the identifier used for frequency capping, audience segmentation and targeting,
sequential ad rotation, and other audience-based ad delivery controls across devices.
| |||||||||||
Returns
true if this device will receive test ads. | |||||||||||
Changes the correlator that is sent with ad requests, effectively starting a new page view.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
The deviceId
for emulators to be used with addTestDevice(String)
.
Something happened internally; for instance, an invalid response was received from the ad server.
The ad request was invalid; for instance, the ad unit ID was incorrect.
The ad request was unsuccessful due to network connectivity.
The ad request was successful, but no ad was returned due to lack of ad inventory.
Female gender.
Male gender.
Unknown gender.
Returns the user's birthday targeting information. Returns null
if the birthday was not
set.
Returns | |
---|---|
Date |
Returns the content url targeting information. Returns null
if the contentUrl was not
set.
Returns | |
---|---|
String |
Returns extra parameters to pass to a specific custom event adapter. Returns null
if no
custom event extras of the provided type were set.
Parameters | |
---|---|
adapterClass |
Class
|
Returns | |
---|---|
Bundle |
Returns the custom targeting parameters.
Returns | |
---|---|
Bundle |
Returns the user's gender targeting information. Returns -1
if the gender was not set.
Returns | |
---|---|
int |
Returns targeting information keywords. Returns an empty Set
if no keywords were added.
Returns | |
---|---|
Set<String> |
Returns the user's location targeting information. Returns null
if the location was not
set.
Returns | |
---|---|
Location |
Returns true
if manual impression reporting is enabled.
Returns | |
---|---|
boolean |
Returns extra parameters to pass to a specific ad network adapter. Ad network adapters provide
a NetworkExtras
class. Returns null
if no network extras of the provided type
were set.
Parameters | |
---|---|
networkExtrasClass |
Class
|
Returns | |
---|---|
T |
Returns extra parameters to pass to a specific ad network adapter. Returns null
if no
network extras of the provided type were set.
Parameters | |
---|---|
adapterClass |
Class
|
Returns | |
---|---|
Bundle |
Returns the identifier used for frequency capping, audience segmentation and targeting, sequential ad rotation, and other audience-based ad delivery controls across devices.
Returns | |
---|---|
String |
Returns true
if this device will receive test ads.
Parameters | |
---|---|
context |
Context
|
Returns | |
---|---|
boolean |
Changes the correlator that is sent with ad requests, effectively starting a new page view. The correlator is the same for all the ad requests coming from one page view, and unique across page views. After updating the correlator, ads must be refreshed for the new correlator to take effect.