Mobile at the moment. Adwhirl only requires the class call in xml and the adwhirl key in the manifest plus all the provider sdk on the build path. Everything is working fine ads load and rotate between millennial and admob. All that Im trying to figurr out is how to stop adwhirl loading ads when visibility.gone is invoked then re load when visibility.visible is invoked. AdWhirl documentation is minimal does not discuss anything regrading this.
Best Regards
Jason
private void rotateAd() {if (!this.hasWindow) {this.isScheduled = false;return;}if (this.getVisibility() == View.GONE) {this.rotateThreadedDelayed();Log.e("AWLayout", "View.GONE");return;}Log.e("AWLayout", "View.VISIBLE");Log.i(AdWhirlUtil.ADWHIRL, "Rotating Ad");nextRation = adWhirlManager.getRation();handler.post(new HandleAdRunnable(this));}public void run() {AdWhirlLayout adWhirlLayout = adWhirlLayoutReference.get();if (adWhirlLayout != null) {Activity activity = adWhirlLayout.activityReference.get();if (activity == null) {return;}if (adWhirlLayout.adWhirlManager == null) {adWhirlLayout.adWhirlManager = new AdWhirlManager(new WeakReference<Context>(activity.getApplicationContext()),keyAdWhirl);}if (!adWhirlLayout.hasWindow) {adWhirlLayout.isScheduled = false;return;}if (adWhirlLayout.getVisibility() == View.GONE) {adWhirlLayout.rotateThreadedDelayed();Log.e("AWLayout", "View.GONE");return;}Log.e("AWLayout", "View.VISIBLE");adWhirlLayout.adWhirlManager.fetchConfig();adWhirlLayout.extra = adWhirlLayout.adWhirlManager.getExtra();if (adWhirlLayout.extra == null) {adWhirlLayout.scheduler.schedule(this, 30, TimeUnit.SECONDS);} else {adWhirlLayout.rotateAd();}}}}