use of com.google.android.gms.ads.doubleclick.PublisherAdRequest in project prebid-mobile-android by prebid.
the class DFPBannerFragment method setupBannerWithoutWait.
private void setupBannerWithoutWait() {
FrameLayout adFrame = (FrameLayout) root.findViewById(R.id.adFrame);
adFrame.removeAllViews();
adView1 = new PublisherAdView(getActivity());
adView1.setAdUnitId(Constants.DFP_BANNER_ADUNIT_ID_320x50);
adView1.setAdSizes(new AdSize(320, 50));
adView1.setAdListener(adListener);
adFrame.addView(adView1);
// region PriceCheckForDFP API usage
PublisherAdRequest.Builder builder = new PublisherAdRequest.Builder();
PublisherAdRequest request = builder.build();
Prebid.attachBids(request, Constants.BANNER_320x50, this.getActivity());
// endregion
adView1.loadAd(request);
}
use of com.google.android.gms.ads.doubleclick.PublisherAdRequest in project prebid-mobile-android by prebid.
the class DFPBannerFragment method setupBannerWithWait.
private void setupBannerWithWait(final int waitTime) {
FrameLayout adFrame = (FrameLayout) root.findViewById(R.id.adFrame2);
adFrame.removeAllViews();
adView2 = new PublisherAdView(getActivity());
adView2.setAdUnitId(Constants.DFP_BANNER_ADUNIT_ID_300x250);
adView2.setAdSizes(new AdSize(300, 250));
adView2.setAdListener(adListener);
adFrame.addView(adView2);
// region PriceCheckForDFP API usage
PublisherAdRequest.Builder builder = new PublisherAdRequest.Builder();
PublisherAdRequest request = builder.build();
Prebid.attachBidsWhenReady(request, Constants.BANNER_300x250, this, waitTime, this.getActivity());
// endregion
}
Aggregations