java.lang.Object | |
↳ | com.google.android.gms.ads.search.SearchAdRequest.Builder |
Builds a SearchAdRequest
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add extra parameters to pass to a specific custom event adapter.
| |||||||||||
Add extra parameters to pass to a specific ad network adapter.
| |||||||||||
Add extra parameters to pass to a specific ad network adapter.
| |||||||||||
Causes a device to receive test ads.
| |||||||||||
Constructs a
SearchAdRequest with the specified attributes.
| |||||||||||
Sets the color of the ad URL.
| |||||||||||
Sets the background color of the ad.
| |||||||||||
Sets a gradient for the ad background.
| |||||||||||
Sets the border color of the ad container.
| |||||||||||
Sets the thickness of the border in pixels around the ad container.
| |||||||||||
Sets the type of border around the ad container.
| |||||||||||
Sets the color of the call button when a call extension is shown.
| |||||||||||
Sets custom channels for the ad request.
| |||||||||||
Sets the color of the ad description.
| |||||||||||
Sets the font used to render the ad.
| |||||||||||
Sets the text color of the ad header.
| |||||||||||
Sets the font size of the header text in pixels.
| |||||||||||
Sets the user's location for targeting purposes.
| |||||||||||
Sets the query for requesting a search ad.
| |||||||||||
This method allows you to specify whether you would like your app to be treated as
child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA) -
http://business.ftc.gov/privacy-and-security/childrens-privacy.
|
[Expand]
Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Add extra parameters to pass to a specific ad network adapter. networkExtras
should be an instance of com.google.ads.mediation.NetworkExtras
, which is
provided by ad network adapters.
Causes a device to receive test ads. The deviceId
can be obtained by viewing the
logcat output after creating a new ad. For emulators, use
DEVICE_ID_EMULATOR
.
Sets the color of the ad URL. Transparency is not supported. rgb(int, int, int)
can be
used to specify this color.
Sets the background color of the ad. Calling this method will override any previous calls
to setBackgroundColor(int)
or setBackgroundGradient(int, int)
. Transparency is not
supported. rgb(int, int, int)
can be used to specify this color.
Sets a gradient for the ad background. Calling this method will override any previous
calls to setBackgroundColor(int)
or setBackgroundGradient(int, int)
. Transparency is
not supported. rgb(int, int, int)
can be used to specify these colors.
top | The color of the gradient at the top of the ad. |
---|---|
bottom | The color of the gradient at the bottom of the ad. |
Sets the border color of the ad container. Transparency is not supported.
rgb(int, int, int)
can be used to specify this color. This setting is ignored if
setBorderType(int)
is set to BORDER_TYPE_NONE
.
Sets the thickness of the border in pixels around the ad container. This setting is
ignored if setBorderType(int)
is set to BORDER_TYPE_NONE
.
Sets the type of border around the ad container. This value must be one of
BORDER_TYPE_NONE
, BORDER_TYPE_DASHED
, BORDER_TYPE_DOTTED
,
BORDER_TYPE_SOLID
.
Sets the color of the call button when a call extension is shown. This value must be one
of CALL_BUTTON_COLOR_DARK
, CALL_BUTTON_COLOR_LIGHT
,
CALL_BUTTON_COLOR_MEDIUM
.
Sets 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.
channelIds | A list of channel IDs separated by '+'. |
---|
Sets the color of the ad description. Transparency is not supported. rgb(int, int, int)
can be used to specify this color.
Sets the font used to render the ad. The same font is used in the header, the description
and the anchor. Fonts are specified using the same value that would be used in CSS (e.g.,
"arial"
).
Sets the text color of the ad header. Transparency is not supported. rgb(int, int, int)
can be used to specify this color.
Sets the font size of the header text in pixels. The font sizes for the description and the anchor are determined from the header size.
Sets the user's location for targeting purposes.
Sets the query for requesting a search ad. The query must be set to receive an ad.
This method allows you to specify whether you would like your app to be treated as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA) - http://business.ftc.gov/privacy-and-security/childrens-privacy.
If you set this method to true
, you will indicate that your app should be treated
as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA).
If you set this method to false
, you will indicate that your app should not be
treated as child-directed for purposes of the Children’s Online Privacy Protection Act
(COPPA).
If you do not set this method, ad requests will include no indication of how you would like your app treated with respect to COPPA.
By setting this method, you certify that this notification is accurate and you are authorized to act on behalf of the owner of the app. You understand that abuse of this setting may result in termination of your Google account.
Note: it may take some time for this designation to be fully implemented in applicable Google services.
This designation will only apply to ad requests for which you have set this method.
tagForChildDirectedTreatment | Set to true to indicate that your app should
be treated as child-directed. Set to false to indicate that your app
should not be treated as child-directed.
|
---|