One year ago my admob account had been banned for a month as I allowed beta testers to click on my banners, resulting in a lot of clicks and causing my 30 day ban from admob.
I'm working on a game and forgot to set my banner in test mode, so i started the game in my device, interstitial was loaded and generated money (0.19$) in my admob account, of course i fixed the problem immediately but I learnt that theres a risk of permanent ban for users who have already been warned.
I can't lose my admob account just because of one click.Any suggestions?Thank you.
There's an option for you to request the admob team to not disable your account. Visit https://support.google.com/admob/faq/3364907#3365454 and go through "Can I appeal the disabling of my account?" and fill the appeal form
If you have list of all devices, please add them as TestDevices so that you will never recive real advertisments on those phone. Please refer admob sample code given to get device ID.
// 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("INSERT_YOUR_HASHED_DEVICE_ID_HERE")
.build();
Related
I just finished my first app, and plan to earn money by admob ads. When I monetise a new app on admob, it want me to search my app in app markets. Does it mean that I should publish my app before put ads in it?
If so, what should I do after getting the admob ad unit id? Copy it into my code and republish a new version of my app which contains the real ads (not the test one)? It sounds stupid to build and publish a new version of app only to put some ads in it.
You should create the Ad Units on AdMob, and then, you only add the next line when you do the requests in your code:
.addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
.addTestDevice("XXXXX")
Where "XXXXX" is a the code associated to that specific device, that you obtain in the Logcat. You can add as many devices as you want to test. It is not necessary to remove the lines when compiling or when releasing for Google Play.
You should compile your first release with the ad code ready to go. (That's what I always do).
You use the test script so that you get dummy ads, that their clients don't get charged for, when you're testing. Then you simply swap out that line for the REAL ad serving code when you're ready to release.
You're not going to get in any trouble if you test with the actual admob code as long as you dont:
1. Click an ad. Ever.
2. Test it a gazillion times. Use the test ad for that.
I'm confused about admob adrequest.
I don't understand adRequest.addTestDevice("device_id").
If I write:
AdRequest adRequest = new AdRequest.Builder()
.addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
.addTestDevice(DeviceInfo.getDeviceId(activity)).build();
for every single device, will it affect my AdMob account?
Or is addTestDevice("deviceid") only for each testing device or real life device?
If I add only my test device's id to AdRequest then will it display the ad to other devices or not?
According to the docs:
It's important to make sure you always request test ads when developing and testing your applications. Testing with live, production ads is a violation of AdMob policy and can lead to suspension of your account. For more information on how to use test ads, see our Ad Targeting guide.
This means your account won't be affected when utilizing test ads regardless of the number of devices/emulators you use.
Basically addTestDevice("deviceid") prevents generating false impressions and ensures test ads being available always.
You can remove all calls to addTestDevice("deviceid") when you're done testing and transitioning to the production phase.
AdRequest adRequest = new AdRequest.Builder().addTestDevice(AdRequest.DEVICE_ID_EMULATOR).addTestDevice("1915F1CFC0D22C6DBB4C8ED97B0CCBA1").build();
This is how you have to add your device id, you can get your device id from your logs in Android studio.
and only for that device, test ads will be loaded.
As per Google policy if you want to test ads then you need to define testing device id in your app or if you are not defining the testing device and test that app a lot of time in one device then Google will consider it as an illegal activity for ad revenue, So we need to define test device id in our debug apps.
Note: Do not click on ads even if you've added device ID in your app. That will be considered as a policy violation and your account may be blocked. You can only test the ads are visible in your app or not.
As mentioned by #AnkitaKoladiya's answer you can use this:
AdRequest adRequest = new AdRequest.Builder().addTestDevice(AdRequest.DEVICE_ID_EMULATOR).build();
You can use it like below to avoid accidentally creating a signed APK with testing device ID:
AdRequest.Builder builder = new AdRequest.Builder();
if (BuildConfig.DEBUG) {
builder.addTestDevice(AdRequest.DEVICE_ID_EMULATOR);
}
builder.build();
This will not include builder.addTestDevice(AdRequest.DEVICE_ID_EMULATOR); while building a signed APK. But it will include this in Dubug or test APK file. All device which installs APK with this line (builder.addTestDevice(AdRequest.DEVICE_ID_EMULATOR);) will be considered as a testing device. So you need to remove that when you'll making a signed APK for Playstore.
And if you don't find your device id, then first run your app without testing device ID in your testing device. After a successful build, you will see your device ID in Logcat.
The official tutorial tells me this:
AdRequest adRequest = new AdRequest.Builder()
.addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
.addTestDevice(Parameters.deviceid)
.build();
rl.addView(adView);
adView.loadAd(adRequest);
I talked with a guy from admob, he told me, that it wouldn't be necessary to get the device ID (this needs an extra permission and I try to avoid such things).
My app is online since about a month now and I have around 180 impressions. I don't got a single click from other people, altough I placed my ad in an extra menu ("Support me"). So users who go into this menu will normally have the idea to show some support I thought.
I'm not sure, but can it be, that the device-ID is really necessary to earn money?
It just makes it so that ads are not served to your test device. It's technically a violation of the TOS if you click on the ads yourself, so that's why it's there, but it is not required.
Device Id's are used in differentiating test devices and other devices. It is not necessary to set your device ID. In that case you will see real ads in your device instead of place holders.
About earning money using admob: Impressions are not going to earn you money, clicks on your ads do. Different countries have different CPC (Cost Per Click) and the amount you earn per click also depends how further has the user gone into by clicking that particular ad. If he buys stuffs, download apps advertised on that ad, you will get high CPC for that particular click.
1.On my new app (did not upload to play store yet) I see ads at the starting and then disappears all the ads. How can I figure out the problem?
2. In my existing app in play store adds doesn't work at night, mostly 11pm to morning. What can I do?
Both apps are on the same adsense account.
Look at your log. It will show ad request and response.
It sounds like there may be no ads available in your area. The logs will show that.
A way of mitigating is to use mediation so if no ad is available if asks the next ad network for an ad.
I am working with adding Google ads in android apps...
my code is as follows
adView = new AdView(this, AdSize.SMART_BANNER, "xxxxxxxxxx");
LinearLayout layout = (LinearLayout)findViewById(R.id.mainlayout);
layout.addView(adView);
AdRequest ads=new AdRequest();
ads.addTestDevice(AdRequest.TEST_EMULATOR);
adView.loadAd(ads);
all is working fine on emulator but doesn't show ads on my device
please suggest me what i'm doing wrong here
Using AdRequest.addTestDevice(TEST_EMULATOR) is the way to fetch the add during testing. However, this piece of code will only fetch test ads from emulators. Everyone running your app on a device will get live ads, and you'll get revenue when users click on those live ads.
Even if you used AdRequest.addTestDevice("YOUR_DEVICE_ID") to get test ads on your device, this only requests test ads on that one specific device, and every other device will get live ads. You don't have to worry about your users getting test ads once you release.
To get DEVICE_ID check this.
This is said by Eric Leichtenschlag Developer Programs Engineer for Google, specializing in Google AdMob Ads SDK support.
You need to check this.