Correlator is used to associate multiple ad views on the same page. When the same
Correlator is attached to multiple ad objects, on the next ad load or refresh, they will
start serving correlated ads.
This code provides a sample on how this class is used for two banners that should serve correlated ads:
Correlator correlator = new Correlator(); PublisherAdView topBannerView = new PublisherAdView(this); topBannerView.setAdSize(...); topBannerView.setAdUnitId(...); topBannerView.setCorrelator(correlator); PublisherAdView bottomBannerView = new PublisherAdView(this); bottomBannerView.setAdSize(...); bottomBannerView.setAdUnitId(...); bottomBannerView.setCorrelator(correlator); topBannerView.loadAd(adRequest); bottomBannerView.loadAd(adRequest);If the app wants to load a different set of correlated ads, the refresh can be forced as following:
correlator.reset(); topBannerView.loadAd(adRequest); bottomBannerView.loadAd(adRequest);
Public Constructor Summary
Public Method Summary