合作咨询
我们的专家服务团队将竭诚为您提供专业的合作咨询服务
HMS Core
Class Info |
|---|
public class BaseAdSlot 广告位的基类。 |
Constructor Name |
|---|
BaseAdSlot() 广告位基类的构造方法。 |
Qualifier and Type | Method Name and Description |
|---|---|
ViewGroup | 获取广告位容器。 |
| 获取广告创意匹配策略。 | |
int | 获取广告位的高度。 |
int | 获取广告荚请求的最大广告数。 |
int | 获取屏幕方向。 |
| 获取广告请求配置。 | |
String | 获取广告位ID。 |
int | 获取广告播放总时长。 |
int | getWidth() 获取广告位的宽度。 |
boolean | 是否允许使用移动流量来预加载广告内容。 |
void | setAllowMobileTraffic(boolean allowMobileTraffic) 设置是否允许使用移动流量来预加载广告内容。 |
void | setContainer(ViewGroup container) 设置广告位容器。 |
void | setCreativeMatchStrategy(CreativeMatchStrategy creativeMatchStrategy) 设置广告创意匹配策略。 |
void | setMaxAdPods(int maxAdPods) 设置广告荚请求的最大广告数。 |
void | setOrientation(int orientation) 设置屏幕方向。 |
void | setRequestOptions(RequestOptions requestOptions) 设置广告请求配置。 |
void | setSize(int widthSize, int heightSize) 设置广告位宽高。 |
void | setSlotId(String slotId) 设置广告位ID。 |
void | setTotalDuration(int totalDuration) 设置广告播放总时长。 |
Method |
|---|
public ViewGroup getContainer() 获取广告位容器。 |
Returns
Type | Description |
|---|---|
ViewGroup | 广告位容器。 |
Method |
|---|
public CreativeMatchStrategy getCreativeMatchStrategy() 获取广告创意匹配策略。 |
Returns
Name | Description |
|---|---|
广告创意匹配策略。 |
Method |
|---|
public int getHeight() 获取广告位高度。 |
Returns
Type | Description |
|---|---|
int | 广告位高度,单位:px。 |
Method |
|---|
public int getMaxAdPods() 获取广告荚请求的最大广告数。 |
Returns
Type | Description |
|---|---|
int | 广告荚请求的最大广告数。 |
Method |
|---|
public int getOrientation() 获取屏幕方向。 |
Returns
Type | Description |
|---|---|
int | 屏幕方向:
|
Method |
|---|
public RequestOptions getRequestOptions() 获取广告请求配置。 |
Returns
Type | Description |
|---|---|
广告请求配置。 |
Method |
|---|
public String getSlotId() 获取广告位ID。 |
Returns
Type | Description |
|---|---|
String | 广告位ID。 |
Method |
|---|
public int getTotalDuration() 获取广告播放总时长。 |
Returns
Type | Description |
|---|---|
int | 广告播放总时长,单位:秒。 |
Method |
|---|
public int getWidth() 获取广告位宽度。 |
Returns
Type | Description |
|---|---|
int | 广告位宽度,单位:px。 |
Method |
|---|
public boolean isAllowMobileTraffic() 是否允许使用移动流量来预加载广告内容。 |
Returns
Type | Description |
|---|---|
boolean | 是否允许使用移动流量来预加载广告内容:
|
Method |
|---|
public void setAllowMobileTraffic(boolean isAllowMobileTraffic) 设置是否允许使用移动流量来预加载广告内容。 |
Parameters
Name | Description |
|---|---|
isAllowMobileTraffic | 设置是否允许使用移动流量来预加载广告内容:
|
Method |
|---|
public void setContainer(ViewGroup container) 设置广告位容器。 |
Parameters
Name | Description |
|---|---|
container | 广告位容器。 |
Method |
|---|
public void setCreativeMatchStrategy(CreativeMatchStrategy creativeMatchStrategy) 设置广告创意匹配策略。 |
Parameters
Name | Description |
|---|---|
creativeMatchStrategy | 广告创意匹配策略。 |
Method |
|---|
public void setMaxAdPods(int maxAdPods) 设置广告荚请求的最大广告数。 |
Parameters
Name | Description |
|---|---|
maxAdPods | 广告荚请求的最大广告数。 |
Method |
|---|
public void setOrientation(int orientation) 设置屏幕方向。 |
Parameters
Name | Description |
|---|---|
orientation | 屏幕方向:
|
Method |
|---|
public void setRequestOptions(RequestOptions requestOptions) 设置广告请求配置。 |
Parameters
Name | Description |
|---|---|
requestOptions | 广告请求配置。 |
Method |
|---|
public void setSize(int widthSize, int heightSize) 设置广告位的宽高。 |
Parameters
Name | Description |
|---|---|
widthSize | 广告位的宽度,单位:px。 |
heightSize | 广告位的高度,单位:px。 |
Method |
|---|
public void setSlotId(String slotId) 设置广告位ID。 |
Parameters
Name | Description |
|---|---|
slotId | 广告位ID。 |
Method |
|---|
public void setTotalDuration(int totalDuration) 设置广告播放总时长。 |
Parameters
Name | Description |
|---|---|
totalDuration | 广告播放总时长,单位:秒。 |
合作咨询
我们的专家服务团队将竭诚为您提供专业的合作咨询服务
解决方案
精准高效的一站式服务支持,助力开发者商业成功