Android AdMob Phonegap Ads Not Displaying - android

I've got AdMob integrated with my Phonegap application, and everything appears to be working in test (when I have request.addTestDevice(AdRequest.TEST_EMULATOR); set, I can see the test ad) but when I run it on a device I see no ads. I'm getting a message that says onFailedToReceiveAd(Ad request successful, but no ad returned due to lack of ad inventory.). I've read that this is just due to AdMob not having anything to display at the time; however, on my AdMob console, I'm not showing that the Site Status is inactive, and I'm not showing any requests. Any idea what I could be doing wrong?
Here is the code I used to get the ads (and yes, my publisher ID is correct, I've copied and pasted it several times):
this.adView = new AdView(this, AdSize.BANNER, "a14e85e6e674aa6");
this.appView.addView(this.adView);
AdRequest request = new AdRequest();
this.adView.loadAd(request);

You're NOT showing that the site status is inactive? Don't you mean that you ARE showing an inactive site status?
The code that you have posted here works. What you've read is true, ads don't fill 100% of the time. In addition, it sometimes takes a while for new apps to start receiving real ads.

Related

Admob with designed for families not showing ads

I want to add my app to "Designed for families", but for mixed audience, so as official documentation said I change my ads request like this:
Bundle extras = new Bundle();
extras.putBoolean("is_designed_for_families", true);
AdRequest adRequest = new AdRequest.Builder()
.addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
.addNetworkExtrasBundle(AdMobAdapter.class, extras)
.tagForChildDirectedTreatment(true)
.build();
The problem is that when I put the "is_designed_for_families" extra, no ads is displayed.
W/Ads: Failed to load ad: 3
Update: I know that error 3 means that admob doesn't have an ad to show at the moment, but I have set "test device" so it should show test ads.
I haven't marked as "Designed for families" in Google Play yet, because I want to check that the ads are displaying correctly.
Any ideas about what is happening?
Error code 3 means that admbob doesn't have an ad to show at the moment.
This means that your code implementation is correct but at the moment there are no ads to show.
Also, if you have just implemented admob, it could take some time for it to start sending you ads. This is called "Warming up" and it could take up to a couple of days (depending on the number of ad requests).
Update: If you receive a NO FILL error (code: 3) while testing "Designed for families" ads, the test ad will not be shown.
To test if your admob implementation works, just remove the extra "is_designed_for_families".
This is the intended behaviour of the admob sdk. Source
You can change AdMob with another because AdMob look at your app settings in the play store and check if its a "familey" app
see this website
https://www.quora.com/Which-is-a-better-alternative-to-AdMob-for-Android-ad-platform

Admob not showing banners, not even test ads, "ad request successful but no ad returned due to lack of ad inventory".

When I try to run my program on my android device, the admob response is this: "ad request successful but no ad returned due to lack of ad inventory".
However, when I try to run my program with ads.show( "banner", { x=10000, y=10000, appId= appID, testMode=true} )
(the bool being there for displaying a test ad) It returns the same thing... any ideas why I dont get the test banners?
the app is in landscape mode, and the app is not yet released on the google play store.
here are the settings from my admob portal:(ALBUM) http://imgur.com/vV5MaD3,trRnju3,Hpl2h3l#0
Thanks for any help in advance! :)
Well, every documentation contains way to get test ads. So, I thought it must be there.
For ADT, you can find it here:- developers.google.com/mobile-ads-sdk/docs/admob/android/… Just find in page for "test ads".
Or just include the code as -
// Create an ad request. Check logcat output for the hashed device ID to
// get test ads on a physical device. e.g.
// "Use AdRequest.Builder.addTestDevice("ABCDEF012345") to get test ads on this device."
AdRequest adRequest = new AdRequest.Builder()
.addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
.build();
For Unity official plugin, it is here- github.com/googleads/googleads-mobile-plugins Click on Plugin to see instructions or direct link - https://github.com/googleads/googleads-mobile-plugins/tree/master/unity#test-ads
AdRequest request = new AdRequest.Builder()
.AddTestDevice(AdRequest.TestDeviceSimulator) // Simulator.
.AddTestDevice("0123456789ABCDEF0123456789ABCDEF") // Test Device 1.
.Build();
Not same you can see, library functions have difference of starting letter.

Configure admob test mode

I've just added an AdMob banner in my test app and I'm afraid it's not in "test mode". I mean, this is my code:
adView = (AdView) rootView.findViewById(R.id.main_adview);
// Create an ad request. Check logcat output for the hashed device ID to
// get test ads on a physical device.
AdRequest adRequest = new AdRequest.Builder()
.addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
.addTestDevice("XXXXXXXX")
.build();
// Start loading the ad in the background.
adView.loadAd(adRequest);
I took the device id from logcat and replaced in the "XXX" text. The problem is: ads are not showing. I found some guys saying that ads may take a long time to start showing in test mode. I'm pretty much ok with that.
My question is : AdMob is showing 2 impressions in the admin panel. How is that possible? The app was not published and I added my device as a test one. I did not changed anything in the admob admin panel to 'enable test mode', should I?
I'm affraid Google will consider this just like I'm cheating.
Thanks a lot!
Don't sweat it. Google is not going to crush you for 2 aberrant impressions. Click on it lots and that's another story.

Using Android Admob sdk I receive same banner all the time

Using Android Admob sdk I receive same banner all the time. On different devices banner is different.
Traces show request for ad and response.
No error or warnings about admob.
Code from my program:
OnCreate()
{
....
AdRequest adRequest = new AdRequest();
m_adView.loadAd(adRequest);
}
Here is request sent from admob sdk to server:
10-12 13:09:28.828: I/Ads(3865): adRequestUrlHtml: AFMA_buildAdURL({"preqs":10,"session_id":"5459438313201923230","u_sd":1.5,"seq_num":"19","slotname":"a14faa4a66469eb","u_w":320,"msid":"com.datecs.bgmaps","js":"afma-sdk-a-v6.1.0","toar":0,"mv":"8014017.com.android.vending","isu":"CF95DC53F383F9A836FD749F3EF439CD","cipa":0,"format":"320x50_mb","net":"wi","app_name":"25.android.com.datecs.bgmaps","hl":"bg","extras":{"_norefresh":"t","gw":1,"mad_hac":"1"},"u_h":533,"carrier":"28401","ptime":362288,"u_audio":3});
I saw "_norefresh" in request url, but I control banners from admob site - refresh rate 45sek. So tis souldn't be a problem.
Any suggestions?
Even if I stop internet - my ads continue to show on screen. sdk repeats last banners cached somewhere in device. On 20-30 ad request I receive once: 'No ads to serve for you' or some like this. So Admob repeat last banners when there is no connection or no new ads from google.
False alarm and spent 2 days to fight nonexistent problem.

Android Admob testmode : No fill. Server replied that no ads are available

I followed the admob SDK tutorial to set up ads for my android application.
But I get no test adds returned :(. Also, on the admob site no requests are registered.
When I run my app the log says the following :
03-18 08:23:56.392: INFO/AdMobSDK(1278): Publisher ID set to xxxxxxxx
03-18 08:23:56.392: INFO/AdMobSDK(1278): Making ad request in test mode
03-18 08:23:56.513: INFO/AdMobSDK(1278): No fill. Server replied that no ads are available (120ms)
The xxx is my publisher Id, but I hid it here with x'es :).
I did set my publisher id in the manifest.
I did set the "setTestDevices method" in my code with the device id the logcat requested
AdManager.setTestDevices( new String[] { "xxxxxxxxxxxxxxxxxxxx", } );
What did I do wrong?? I should get test ads on my phone I suppose?
I find AdMob's test mode to be very unreliable. Sometimes I get no ad, sometimes a test ad, and occasionally real ads show.
I'd not worry about it too much, and instead make sure that ads are showing on the live app. you may want to look at Adwhirl if you don't get ads showing. A fill-reate error basically means AdMob didn't sell all the ad space, so if you want ads to always be shown you may need to look beyond AdMob. Adwhirl is an aggregator, owned by AdMob, so it'll pull ads from other networks if they don't have an ad.

Categories

Resources