Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
package ...
import ...
import com.buzzvil.buzzad.benefit.BuzzAdBenefit;
import com.buzzvil.buzzad.benefit.BuzzAdBenefitConfig;
import com.buzzvil.buzzad.benefit.presentation.pop.PopConfig;

public class App extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        final PopConfig popConfig = new PopConfig.Builder(getApplicationContext(), "POP_UNIT_ID_HERE")
                .build();
        final BuzzAdBenefitConfig buzzAdBenefitConfig = new BuzzAdBenefitConfig.Builder("BENEFIT_APP_ID_HERE")
                .add("POP_UNIT_ID_HERE", popConfig)
                .build();

        BuzzAdBenefit.init(this, buzzAdBenefitConfig);
    }
}

...

Code Block
BuzzAdPop buzzAdPop = new BuzzAdPop("POP_UNIT_ID");
buzzAdPop.preload(new BuzzAdPop.PopPreloadListener() {
    @Override
    public void onPreloaded(int adsSize, int articlesSize) {
        buzzAdPop.showPop(context, true);
    }

    @Override
    public void onError(AdError error) {
        buzzAdPop.showPop(context, false);
    }
});

...