Problem with integrating chartboost on android

Hi guys!

I managed to combine ios & android versions of my game. I have integrated admob but faced a problem with chartboost. It doesn’t show up. I integrated it many time before in previous (not cocos2dx) projects.

Added permissions to manifest:


Here is initialization:

public class HomeActivity extends Cocos2dxActivity
{
private Chartboost cb;

protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);

//Chartboost
this.cb = Chartboost.sharedChartboost();
String appId = “";
String appSignature = "
”;
this.cb.onCreate(this, appId, appSignature, null);
this.cb.startSession();

// Show an interstitial
this.cb.showInterstitial();
}
}

Btw, in ios version everything works just fine.

Please help! :slight_smile:

Have you put the “this.cb.onStart(this);” in your onStart, and the onExit part, etc…. from the Chartboost guide?

Then when you want to show an ad, cache an ad:
cb.cacheInterstitial(strPlaceLabel);

And show an ad:
cb.showInterstitial(strPlace);

1 Like