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.
Related
Ad-mob test ads is not showing on one of my app ,but the same code is working fine on my others app,
then I find out that this is happening because of the app package name ,if I rename the package name then also ads are showing.
Some months ago the app were showing ads , but app got ads serving limited issue ,then I deleted all the ad units from Admob of the app ,after one week this issue solved ,then I wanted to implement ads again but since then even test ads are not showing.
and I couldn't found an error on logcat so I don't Know what to do
There are two things here.
Either you show test ads via local configuration before initializing the sdk like -
val testDeviceIds = Arrays.asList("Your Test ID from logcat. ")
val configuration = RequestConfiguration.Builder().setTestDeviceIds(testDeviceIds).build()
MobileAds.setRequestConfiguration(configuration)
Or add the following in your app-ads.txt file.
google.com, pub-3940256099942544, DIRECT, f08c47fec0942fa0.
More info here: https://developers.google.com/admob/android/test-ads
Admob does not deliver ad when your app live any time. Add test id's and change your application id then test your implementation. When you live your application then restore your application id in gradle and live your app. When your app live on play store admob deliver your ad.
I am finishing up my first app which includes Admob. I have entered my ad unit ID and it is working perfect. I am currently on beta testing, so in order to see 'test' adds, I added my own device using the recommended method:
AdRequest adRequest = new AdRequest.Builder()
.addTestDevice("xxxxxxxxxxxxxxxxxxxx").build();
I have 2 questions:
For Beta testing, how can I prevent my testers to see the live ads without knowing their device IDs?
For go-live, do I have to remove the addTestDevice() calls so I can see the real thing?
What is the usual procedure ?
For Beta testing, how can I prevent my testers to see the live ads
without knowing their device IDs?
You have to know their device id, otherwise they will see real ads. However, you can get device id programatically to put it in addTestDevice() method. See this link
For go-live, do I have to remove the addTestDevice() calls so I can
see the real thing?
It is not necessary to remove the addTestDevice(). But if you want to see real ads then yes it is necessary; though it is better to not remove addTestDevice(), that's how you can prevent yourself from accidentally clicking ads.
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 using Admob SDK to load banner ads from DFP on Android.
I am using the XML method as defined in this page to load up the ads: https://developers.google.com/mobile-ads-sdk/docs/dfp/fundamentals
When I run the apps, I get
06-21 16:44:30.354: I/Ads(2641): onFailedToReceiveAd(Invalid Ad request.)
When I change to testing mode by
adRequest.addTestDevice("xxx");
Then I can see the Google Test banner successfully. So assume my SDK integration is correct, what the heck if the "Invalid Ad request"?
Your ad unit is most likely invalid. You need to get access to the DFP account you are using and make sure that the network ID, ad unit name and dimensions are correct. There could be no matching ads or anything could be going on really... but like you say the test ad works so it is most probably something setup wrong within DFP.
I usually work with DFP on websites so things may be slightly different with the Admob SDK but if it is any help I have this little tool I use to test my DFP ad delivery:
http://coop182.github.io/jquery.dfp.js/dfptests/test.html?google_console=1&networkID=15572793&adunitID=Leader&dimensions=728x90
you can also press CTRL+F10 to bring up the DFP web console and get some more information on the delivery of the ad... but like I said this might not be that much help because it is an Admob ad... but worth a shot!
Form another thread here :
You don't need to have an app already on the market to get a Publisher ID for a new app. In the Android Package URL field that's on the "Add Site/App" form, just enter "market://details?id=your.package.name". You'll of course want to replace the 'your.package.name' with your app's actual package name.
The viewWidth warnings are fine and you will likely still see them after inserting your Publisher ID.
EDIT: There's a nice suggestion here too.
My application is ready, and i have admob into it. I also have the AdRequest.TEST_EMULATOR used for fetching the add. Is it right way or its just the testing way to fetch add. Will i get reveue in live application if i use AdRequest.TEST_EMULATOR.
Thanks
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.