NativeAdsManager
يتوفر إصدار أحدث لهذه الفئة. يرجى التحقق أحدث إصدار.

The NativeAdsManager provides a mechanism to fetch a set of NativeAds and then use them within your application. The recommended usage is to call nextNativeAd() at the moment when you are about to render an ad. The NativeAdsManager can hold at most 10 unique ads at once but supports giving out as many ads as needed by cloning over the set of NativeAds it got back from the server which can be useful for feed scenarios.

When calling loadAds() an optional NativeAd.MediaCacheFlag can be passed to indicate whether to pre-cache the ad images (image, icon, all, or none). If not set, no images will be pre-cached before onAdsLoaded() is called.

الإضافات:Object
الحزمة:ads
أدوات الإنشاء
NativeAdsManager(Context, String, int)
public NativeAdsManager(Context context, String placementId, int numAdsRequested)
المعلمةالوصف
context
placementId
numAdsRequested
طرق المثيلات
setListener(Listener)
public void setListener(Listener listener)
المعلمةالوصف
listener
loadAds()
public void loadAds()
loadAds(EnumSet)
public void loadAds(EnumSet mediaCacheFlags)
المعلمةالوصف
mediaCacheFlags
getUniqueNativeAdCount()
public int getUniqueNativeAdCount()
nextNativeAd()
public NativeAd nextNativeAd()
isLoaded()
public boolean isLoaded()
disableAutoRefresh()
public void disableAutoRefresh()