Configure admob test mode - android

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.

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.

Should I get device ID for Admob when i publish my add

AdRequest adRequest = new AdRequest.Builder()
addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
addTestDevice("HASH_DEVICE_ID")
build();
I just use my device ID or How can i remove test mode and use the Correct mode
-How can I change it ?
No, you don't need to remove this
addTestDevice(AdRequest.DEVICE_ID_EMULATOR) addTestDevice("HASH_DEVICE_ID");
It has been provided in such a way that only the emulator and your own devices will get test ads. For Example I use my apps even after releasing them and i always keep this code included. I download app on my devices again from play store and use them. It shows test ads only on my device (and the devices whose Device ID I have included). So all other users in the world get Real ad impressions.
Welcome,
You will put the Device ID of the AVD emulator where you want to test if Admob works, I have an app using Admob with the Device ID of my emulator test mode and it works fine on real devices. It doesn't show the test banner. But if you want to quit it then your code will look like this:
AdRequest adRequest = new AdRequest.Builder().build();

Android only one admob ad is showing

I recently got the admob ads working correctly, I tested it through:
AdRequest adRequest = new AdRequest.Builder()
//.addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
//.addTestDevice("INSERT_YOUR_HASHED_DEVICE_ID_HERE")
.build();
The .addtestDevice worked for the Adrequest.DEVICE_ID_EMULATOR. I received a test ad when that was not in comments. I took it out because I just wanted to see what would happen. I am only seeing one ad being displayed and refreshed constantly. Is there a way to have different ads be shown?
If you mean you're only seeing one live add, that's up to google (or your other providers) as to which ad is being shown. See ADMOB application showing only one add always, how to change the advertisements?

android AD not shown if testdevice is added

AdView adView = (AdView)v.findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder()
.addTestDevice("device#")
.build();
adView.loadAd(adRequest);
I didnt include my actual device number (idk does it have to be a secret?) but I have it.
Anyhow this is my code and whenever i comment out the addTestDevice part i see the ads in my real device, but I dont see them when i have the addTestDevie part.
I dont think this is the way it supposed to be. My device should display the ads but ads should not be clikable. Any solution?
NB there is no value is hiding your your device ID AFAIK.
When you use addTestDevice you should see test ads. They tend to be quite different to real ads. Ie they say things like "Test ad" etc. And you should be able to click on them.

Categories

Resources