java.lang.Object | |
↳ | com.google.android.gms.ads.search.SearchAdRequest |
A SearchAdRequest
contains targeting information used to fetch an ad from Search Ads for
Apps. Ad requests are created using SearchAdRequest.Builder
.
Nested Classes | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SearchAdRequest.Builder |
Builds a SearchAdRequest .
|
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | BORDER_TYPE_DASHED | Dashed border. | |||||||||
int | BORDER_TYPE_DOTTED | Dotted border. | |||||||||
int | BORDER_TYPE_NONE | No border. | |||||||||
int | BORDER_TYPE_SOLID | Solid border. | |||||||||
int | CALL_BUTTON_COLOR_DARK | Dark-colored call button. | |||||||||
int | CALL_BUTTON_COLOR_LIGHT | Light-colored call button. | |||||||||
int | CALL_BUTTON_COLOR_MEDIUM | Medium-colored call button. | |||||||||
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. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DEVICE_ID_EMULATOR |
The deviceId for emulators to be used with
addTestDevice(String) .
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the color of the ad URL.
| |||||||||||
Returns the background color of the ad.
| |||||||||||
Returns the color of the background gradient at the bottom of the ad.
| |||||||||||
Returns the color of the background gradient at the top of the ad.
| |||||||||||
Returns the border color of the ad container.
| |||||||||||
Returns the thickness of the border in pixels around the ad container.
| |||||||||||
Returns the type of border around the ad container.
| |||||||||||
Returns the color of the call button when a call extension is shown.
| |||||||||||
Returns the custom channels for the ad request.
| |||||||||||
Returns extra parameters to pass to a specific custom event adapter.
| |||||||||||
Returns the color of the ad description.
| |||||||||||
Returns the font used to render the ad.
| |||||||||||
Returns the font size of the header text in pixels.
| |||||||||||
Returns the font size of the header text in pixels.
| |||||||||||
Returns the user's location targeting information.
| |||||||||||
Returns extra parameters to pass to a specific ad network adapter.
| |||||||||||
Returns extra parameters to pass to a specific ad network adapter.
| |||||||||||
Returns the query of the search ad request.
| |||||||||||
Returns
true if this device will receive test ads.
|
[Expand]
Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Dashed border.
Dotted border.
No border.
Solid border.
Dark-colored call button.
Light-colored call button.
Medium-colored call button.
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.
The deviceId
for emulators to be used with
addTestDevice(String)
.
Returns the color of the ad URL.
Returns the background color of the ad.
Returns the color of the background gradient at the bottom of the ad.
Returns the color of the background gradient at the top of the ad.
Returns the border color of the ad container.
Returns the thickness of the border in pixels around the ad container.
Returns the type of border around the ad container.
Returns the color of the call button when a call extension is shown.
Returns the custom channels for the ad request. Custom channels allow publishers to track the performance of specific groups of ads. These custom channels need to created on the AdSense website. Reports can then be created based on the channels.
Returns extra parameters to pass to a specific custom event adapter. Returns null
if
no custom event extras of the provided type were set.
Returns the color of the ad description.
Returns the font used to render the ad. The same font is used in the header, the description and the anchor.
Returns the font size of the header text in pixels.
Returns the font size of the header text in pixels. The font sizes for the description and the anchor are determined from the header size.
Returns the user's location targeting information. Returns null
if the location was
not set.
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.
Returns extra parameters to pass to a specific ad network adapter. Returns null
if no
network extras of the provided type were set.
Returns the query of the search ad request.
Returns true
if this device will receive test ads.