Ejemplo n.º 1
0
  public void handle() {
    if (AdViewTargeting.getRunMode() == RunMode.TEST) Log.d(AdViewUtil.ADVIEW, "Into Wooboo");
    AdViewLayout adViewLayout = adViewLayoutReference.get();
    if (adViewLayout == null) {
      return;
    }
    Extra extra = adViewLayout.extra;
    int bgColor = Color.rgb(extra.bgRed, extra.bgGreen, extra.bgBlue);
    int fgColor = Color.rgb(extra.fgRed, extra.fgGreen, extra.fgBlue);
    WoobooAdView adView = null;
    if (AdViewTargeting.getRunMode() == RunMode.TEST)
      adView =
          new WoobooAdView(
              adViewLayout.getContext(), ration.key, bgColor, fgColor, true, 120, null);
    else if (AdViewTargeting.getRunMode() == RunMode.NORMAL)
      adView =
          new WoobooAdView(
              adViewLayout.getContext(), ration.key, bgColor, fgColor, false, 120, null);
    else {
      adView =
          new WoobooAdView(
              adViewLayout.getContext(), ration.key, bgColor, fgColor, false, 120, null);
    }

    adView.setHorizontalScrollBarEnabled(false);
    adView.setVerticalScrollBarEnabled(false);
    adView.setAdListener(this);
    // adViewLayout.adViewManager.resetRollover();
    //	adViewLayout.handler.post(new ViewAdRunnable(adViewLayout, adView));
    //	adViewLayout.rotateThreadedDelayed();

  }
  @Override
  public void handle() {
    // TODO Auto-generated method stub
    if (AdViewTargeting.getRunMode() == RunMode.TEST) Log.d(AdViewUtil.ADVIEW, "Into Greystripe");
    AdViewLayout adViewLayout = adViewLayoutReference.get();
    if (adViewLayout == null) {
      return;
    }
    try {
      Activity activity = adViewLayout.activityReference.get();
      if (activity == null) {
        return;
      }
      GSSDK.initialize(activity.getApplicationContext(), ration.key);
      BannerView banner = new BannerView(activity);

      banner.addListener(this);

      // adViewLayout.addView(banner, new LayoutParams(
      //		LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
      banner.refresh();
    } catch (Exception e) {
      adViewLayout.rotatePriAd();
    }
  }
 @Override
 public void onFailedToReceiveAd(BannerView arg0) {
   // TODO Auto-generated method stub
   if (AdViewTargeting.getRunMode() == RunMode.TEST) Log.d(AdViewUtil.ADVIEW, "Greystripe fail");
   arg0.removeListener(this);
   AdViewLayout adViewLayout = adViewLayoutReference.get();
   if (adViewLayout == null) {
     return;
   }
   adViewLayout.adViewManager.resetRollover_pri();
   adViewLayout.rotateThreadedPri();
 }
  @Override
  public void onReceivedAd(BannerView arg0) {
    // TODO Auto-generated method stub
    if (AdViewTargeting.getRunMode() == RunMode.TEST)
      Log.d(AdViewUtil.ADVIEW, "Greystripe success");
    arg0.removeListener(this);

    AdViewLayout adViewLayout = adViewLayoutReference.get();
    if (adViewLayout == null) {
      return;
    }
    adViewLayout.adViewManager.resetRollover();
    adViewLayout.handler.post(new ViewAdRunnable(adViewLayout, arg0));
    adViewLayout.rotateThreadedDelayed();
  }
Ejemplo n.º 5
0
  @Override
  public void onReceiveAd(Object arg0) {
    // TODO Auto-generated method stub
    WoobooAdView adView = (WoobooAdView) arg0;
    if (AdViewTargeting.getRunMode() == RunMode.TEST) Log.d(AdViewUtil.ADVIEW, "Wooboo success");
    adView.setAdListener(null);

    AdViewLayout adViewLayout = adViewLayoutReference.get();
    if (adViewLayout == null) {
      return;
    }

    adViewLayout.adViewManager.resetRollover();
    adViewLayout.handler.post(new ViewAdRunnable(adViewLayout, adView));
    adViewLayout.rotateThreadedDelayed();
  }
Ejemplo n.º 6
0
  @Override
  public void onFailedToReceiveAd(Object arg0) {
    // TODO Auto-generated method stub
    WoobooAdView adView = (WoobooAdView) arg0;
    if (AdViewTargeting.getRunMode() == RunMode.TEST) Log.d(AdViewUtil.ADVIEW, "Woboo failure");

    adView.setAdListener(null);

    AdViewLayout adViewLayout = adViewLayoutReference.get();
    if (adViewLayout == null) {
      return;
    }

    adViewLayout.adViewManager.resetRollover_pri();
    adViewLayout.rotateThreadedPri();
  }
Ejemplo n.º 7
0
  public void onPlayFinish() {

    if (AdViewTargeting.getRunMode() == RunMode.TEST)
      Log.d(AdViewUtil.ADVIEW, "Wooboo onPlayFinish");
  }