我正在尝试在我的 Android 应用程序中实现 PlayHaven 的 SDK,虽然我确实收到了插页式广告,但我似乎无法捕捉到内容被解雇的事件。加载内容时,我确实得到了一个日志。
这是我尝试过的:
PlayHaven.configure(this, R.string.token, R.string.secret);
OpenRequest open = new OpenRequest();
open.send(this);
placement = new Placement("some_placement");
placement.setListener(pl); //PlacementListener
placement.preload(this);
PlacementListener(pl) 实现:
private PlacementListener pl = new PlacementListener() {
@Override
public void contentLoaded(Placement placement) {
Log.i(TAG_PH, "PlayHaven contentLoaded");//this log is displayed
startActivity(FullScreen.createIntent(Splash.this,placement));
}
@Override
public void contentFailed(Placement placement, PlayHavenException e) {
Log.i(TAG_PH, "PlayHaven contentFailed");
}
@Override
public void contentDismissed(Placement placement, DismissType dismissType,
Bundle data) {
Log.i(TAG_PH, "PlayHaven content Dismissed");//this log is **NOT** displayed
}
};