Nani
Nani

Reputation: 11

mdotm ads integration in android application

I have developed one android application for client, in that I am integrating ads by using mdotm. But the live ads cant be displayed in the application, in case of Test ads, is displayed successfully.

Code

adView = (MdotMAdView)findViewById(R.id.mdotm_ad_view);
    request = new MdotMAdRequest();
    request.setAppKey("1e05e3a737c4f008ed68470d4c312316");// jim
    //request.setTestMode("1");// for test ads
    request.setTestMode("0");// for live ads
    request.setEnableCaching(true);
    //      request.setAdRefreshInterval(10); // here value is in seconds
    //      adView.loadAd(this, request);
    interstitial.loadInterstitial(this, request);
-------------------------------------------------------------------------------

public void loadInterstitial(MdotMAdEventListener listener, MdotMAdRequest adRequest) {
    mAdEventListener = listener;
    isInterstitialReady = false;
    MdotMNetworkManager mAdManager = MdotMNetworkManager.getInstance(mContext);
    mAdManager.setAdNetworkListener(this);
    adRequest.setLoadInterstitial(true);
    adRequest.setAdSize(MdotMUtils.getUtilsInstance().getDisplaySize(mContext));
    / //TODO remove this
    // adRequest.setAdSize(MdotMAdSize.BANNER_320_480);
    interstitialResponse = null;
    mAdManager.sendRequest(adRequest);

} 

In case of Test ads it is fine, but in case of live ads I am not getting any response i.e. response is empty.

Please review the code above and help me where it is going wrong?

Upvotes: 0

Views: 485

Answers (1)

Harsh Baid
Harsh Baid

Reputation: 7249

The code below is sufficient to get the Interstitial ads from MdotM. May be they are not targeting any live ads for your location. Contact MdotM Publishers publishers [at] mdotm [dot] com for further details.

Code

adView = (MdotMAdView)findViewById(R.id.mdotm_ad_view);
request = new MdotMAdRequest();
request.setAppKey("1e05e3a737c4f008ed68470d4c312316");// 
//request.setTestMode("1");// for test ads
request.setTestMode("0");// for live ads
request.setEnableCaching(true);
//request.setAdRefreshInterval(10); // here value is in seconds
//adView.loadAd(this, request);
interstitial.loadInterstitial(this, request);

PS: This answer is from someone which I don't have link as of now. The he (question editor) made mistake by editing question instead of answering as I am doing on his behalf, any upvotes would be appreciated if you find this helpful.

Upvotes: 3

Related Questions