I have a source code with interstitial admob, I've changed Interstitial MobFox, the game runs but does not show interstitial
I put the code used to generate the interstitial, to help me
import com.adsdk.sdk.Ad;
import com.adsdk.sdk.AdListener;
import com.adsdk.sdk.AdManager;
import com.adsdk.sdk.Gender;
import com.adsdk.sdk.banner.AdView;
...
public class MainGame extends Screen {
...
//ad
private AdManager mManager;
int ad_counter = 0;
...
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
//setDebugMode(true);
//initialiseAccelerometer();
//highscores
highscoreManager = new HighScoreManager(this, savedInstanceState, layout);
// Create the interstitial
mManager = new AdManager(this,"http://my.mobfox.com/request.php",
"fe96717d9875b9da4339ea5367eff1ec", true);
//interstitial = new InterstitialAd(this, getResources().getString(R.string.InterstitialAd_unit_id));
}
public void openAd() {
runOnUiThread(new Runnable() {
public void run() {
// Create ad request
mManager.requestAd();
}
});
}
...
public synchronized void GameOver() {
if (ad_counter >= getResources().getInteger(R.integer.add_shows_every_X_gameovers)) {
mManager.showAd();//TODO: Remove openAd(); to stop interstatial ads.
ad_counter = 0;
}