Skip to content

AD SDK 注意点

kevenzxd edited this page Mar 20, 2019 · 6 revisions

1 广告使用注意点

1. Native 创建注意

  1. Icon和Image的点击需要设置为true.
  2. 建议在image外添加一层Framelayout, 来固定image的位置,并不是直接把属性写在image中。
  3. 如果需要给特定view添加点击监听,请使用Builder.withExtra(MoPubNativeAd.Builder.ACTION_VIEW_ID, R.id.tv_action)接口。
  4. 在定义textview时候,使用wrapcontent来约束宽和高。

2. Native Layout的定义问题

由于我们使用的native layout为通用型布局,那么我们定义的时候,需要符合所有广告网络的政策需求

2.1.1 Image elements

* Publishers are allowed to scale the image down without modifying the aspect ratio
* Publishers are allowed to crop the image symmetrically by up to 20% in only one dimension (height or width)

2.1.2 Text elements

* Truncation
* * Title text (required): Ensure that there is no truncation of text up to 30 characters
* * Body text (optional): Ensure that there is no truncation of text up to 90 characters
* Font size must be consistent with other surrounding elements in the app

2.1.3 Other elements

* The app store icon (image), price text, and star/review elements are optional for app install ads and video app install ads.
* The URL is optional for content ads.
* Buttons in both app install and content ads consist of an .SVG icon and a text element. 

At least one of these is required to be visible. Both the .SVG icon and text element can be visible in the same ad at the same time, if desired.

2.1.4 Additional policies

* Only the ad titles, URLs, CTA, and image assets can be clickable (no clickable "white" space).
* The background of the ad must be not clickable. If you use the image element as the background of the ad, the image must be not clickable.
* MediaView is required to render the main video or image asset in an ad. You can use ImageView to render the logo and app icon assets.

3. 加载广告:一定要在主线程中加载广告。

2. 升级Mavl AAR版本之后注意点

在升级Mavl AAR版本为1.1.2之后,FB广告的行为有些改变,增加了Facebooknativebanner的样式。

请大家在发版本之前,检查应用中,是否有banner样式的原生广告,如果有的话,跟赵庸联系,把相应的mopub id提供给她,并且替换一个新的广告ID。

不需要查看的应用列表为:messenger, messenger pro, textfun, getins, antivirus, workout

3. 添加测试ID

Google test id:

在log中过滤"builder", 找到log: eg: "I Ads : Use AdRequest.Builder.addTestDevice("169FF11AC41B8F79CFACFEDBF0155E2F") to get test ads on this device."

调用MoPubNativeAd.Builder.addGoogleTestId("169FF11AC41B8F79CFACFEDBF0155E2F");

此方法目前可以给GoogleNative添加测试ID.