/** * Loads a new ad, if the ad space is visible, and sets the * placement ID, ad width, and ad height attributes of the AdView. * * @param placementID The placement ID to use in this view. * @param width The width of the ad. * @param height The height of the ad. * @return <code>true</code> if the ad will begin loading, * <code>false</code> otherwise. */ public boolean loadAd(String placementID, int width, int height) { setAdSize(width, height); this.setPlacementID(placementID); return loadAd(); }
private void executeBannerRequest() { bannerAdView.loadAd(); waitForTasks(); Robolectric.flushBackgroundThreadScheduler(); Robolectric.flushForegroundThreadScheduler(); waitForTasks(); Robolectric.flushBackgroundThreadScheduler(); Robolectric.flushForegroundThreadScheduler(); }
private void executeBannerRequest(){ bannerAdView.setAutoRefreshInterval(30); bannerAdView.loadAd(); waitForTasks(); Robolectric.flushBackgroundThreadScheduler(); Robolectric.flushForegroundThreadScheduler(); waitForTasks(); Robolectric.flushBackgroundThreadScheduler(); Robolectric.flushForegroundThreadScheduler(); }