【发布时间】:2015-04-08 02:50:32
【问题描述】:
我一直在尝试为 Chartboost 插页式广告实施 admob 自定义事件,但自定义事件从未触发。
我在 admob 上添加自定义事件设置页面我将我的类名称设置为 com.mycompany.advertising.ChartBoostInterstitial
该文件位于此包中,src 文件夹/com.mycompany.advertising.ChartBoostInterstitial
这是课程,
import android.content.Context;
import android.os.Bundle;
import com.chartboost.sdk.CBLocation;
import com.chartboost.sdk.Chartboost;
import com.google.android.gms.ads.mediation.MediationAdRequest;
import com.google.android.gms.ads.mediation.customevent.CustomEventInterstitial;
import com.google.android.gms.ads.mediation.customevent.CustomEventInterstitialListener;
public class ChartBoostInterstitial implements CustomEventInterstitial {
public static CustomEventInterstitialListener mListener;
@Override
public void requestInterstitialAd(Context context,
CustomEventInterstitialListener listener, String serverParameter,
MediationAdRequest mediationAdRequest, Bundle customEventExtras) {
System.out.println("GOOGLE MEDIATION CALLING THIS!!!!!!!!!!!!!!!!!!!!!!!!!!!");
mListener = listener;
Chartboost.cacheInterstitial(CBLocation.LOCATION_DEFAULT);
}
@Override
public void showInterstitial() {
Chartboost.showInterstitial(CBLocation.LOCATION_DEFAULT);
}
@Override
public void onDestroy() {
// TODO Auto-generated method stub
}
@Override
public void onPause() {
// TODO Auto-generated method stub
}
@Override
public void onResume() {
// TODO Auto-generated method stub
}
手册并不清楚是否应该实例化此类。 System.out.println("GOOGLE 中介调用这个!!!!!!!!!!!!!!!!!!!!!!!!!!!");无论我加载多少广告,都不会调用。如果我至少可以打印这一行,那么我应该能够构建自定义事件适配器的其余部分。唯一发生的情况是正常的 adMob 插页式广告加载。
【问题讨论】:
标签: android ios admob chartboost