I have been trying to implement the admob custom event for Chartboost interstitial ads but the custom event never fires.
I my add custom event settings page on admob I set my Class Name to com.mycompany.advertising.ChartBoostInterstitial
The file is located in this package, src folder/com.mycompany.advertising.ChartBoostInterstitial
Here is the class,
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
}
The manual is not clear on if this class is supposed to be instantiated or not. The System.out.println("GOOGLE MEDIATION CALLING THIS!!!!!!!!!!!!!!!!!!!!!!!!!!!"); is never called no matter how many ads I load. If I can get at least this line to print then I should be able to build up the rest of the custom event adapter. The only thing that happens is that a normal adMob interstitial loads.