Reputation: 725
I am trying to setup Interstitial Ads using Mopub on my Android Application. I have followed the tutorial at https://github.com/mopub/mopub-android-sdk/wiki/Getting-Started and get this error:
MoPub: Loading url: "link here"
MoPub: Ad failed to load.
It does not show any other errors or suggestions on how to fix this. I have been looking around but have been unable to find anything that fixes my problem. Has someone else had this problem and is there a way to fix it? Any suggestions are appreciated. Thanks for your time!
Upvotes: 1
Views: 5255
Reputation: 2650
Be sure to develop and test with MoPubs own test ads. This link of the MoPub documentation will show you how to use test ad id's to get an ad on every request while developing.
To make things easy for you, this is a often used solution making use of the ternary operator. This says IF development THEN use the test ad id ELSE use your production ad id.
moPubView = (MoPubView) findViewById(R.id.adview);
moPubView.setAdUnitId(BuildConfig.DEBUG ? "b195f8dd8ded45fe847ad89ed1d016da" : "YOUR_PRODUCTION_BANNER_ID");
Upvotes: 0
Reputation: 11
I have the same issue, but this is the reason why the ADs aren't showing.
Thank you for updating your payment information. Your account is in review. You will be able to receive ads from MoPub Marketplace once your account has been approved. For questions, please visit our help page or contact [email protected]. Tip: Monetize your inventory through network mediation or with direct sales while we process your request
This was in the MarketPlace
column of my account. In the message it explains that they have to approve your account before it can serve ADs.
The comforting thing is that my account actually gets notified when I make a request for ADs and that gives me the assurance that it is working.
I just think you have to wait till your account is approved. But their Blog says that if it persists, just contact then.
Upvotes: 1
Reputation: 3872
This could be caused by so many things. Honestly the best course of action is to contact [email protected] and they will likely have some insight on their end what the actual issue is.
In my case it was because I had turned off/paused all ad sources and orders for my ad unit. Once I had turned on at least one ad source, the failures stopped.
Upvotes: 0
Reputation: 86
I had a similar problem, though the ad was shown a couple of times first, but after that the error "Ad failed to load." showed each new time. It turned out that I had a limit for max amount of impressions set on the MoPub portal. All I had to do to resolve the problem was to remove the tick "Yes, show maximum of:" in Ad Unit settings on the portal. Hope, this can help.
Upvotes: 2