...
Application 의 onCreate에 다음과 같이 추가합니다. BuzzAdBenefit.init
시점에 BuzzAdBenefitConfig
에 PopConfig를 설정합니다. YOUR_POPFEED_UNIT_ID
는 Feed 지면에서 사용한 Unit ID 을 사용해야합니다.
Code Block |
---|
|
final PopConfig popConfig = new PopConfig.Builder(getApplicationContext(), "YOUR_POPFEED_UNIT_ID")
.build();
final BuzzAdBenefitConfig buzzAdBenefitConfig = new BuzzAdBenefitConfig.Builder(context)
...생략...
.setPopConfig(popConfig)
.build();
BuzzAdBenefit.init(this, buzzAdBenefitConfig); |
...
Code Block |
---|
|
public final class MainActivity extends AppCompatActivity {
private BuzzAdPop buzzAdPop;
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.buzzAdPop = new BuzzAdPop((Context) this, "YOUR_POPFEED_UNIT_ID");
}
protected void onResume() {
super.onResume();
buzzAdPop.showInAppPop((Activity) this, (ViewGroup) null);
}
protected void onPause() {
super.onPause();
buzzAdPop.removeInAppPop();
}
} |