开发者控制台
感谢您的访问。此页面目前仅提供英语版本。我们正在开发中文版本。谢谢您的理解。

Ad Targeting Options

Besides ad unit size, there are other targeting options you can include in the request that's sent to the Amazon Mobile Ad Network. For example, you may include latitude and longitude gathered from the device. To set targeting options, you must construct an AdTargetingOptions object and pass it to the AdLayout.loadAd or InterstitialAd.loadAd method call.

Optional - Including Latitude and Longitude

You may choose to supply the Amazon Mobile Ads API with latitude and longitude coordinates as part of an ad request, if your app has permission from the user to gather this information. Requests that contain geographic location may earn higher CPMs.

Important: On Android your app must include permissions for ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION to utilize latitude and longitude coordinates. See Step 2 of the Quick Start Guide for more information about permissions. Example:

AdTargetingOptions opt = new AdTargetingOptions().enableGeoLocation(true);

Advanced Option

Advanced options can be set as String key value pairs through the setAdvancedOption method. The advanced options currently include "ec" for floor price. Example:

AdTargetingOptions opt = new AdTargetingOptions().setAdvancedOption("key", "value");