Okay, so I recently completed most of my first app for android. It's almost ready for the market, but I'd like to put in ads. I have installed and registered with AdWhirl, but I cannot figure out how to actually make ads show up, based on their instructions. I have found a few resources out there that help somewhat (such as http://malsandroid.blogspot.com/2010/05/admob-and-adwhirl.html ) but nothing that has actually let me make the ads work. I'm not sure if my inexperience is the issue or if the AdWhirl support is just that bad.
The AdWhirl support says:
"
4. In the Activity where you intend to add the ad:
● Import the com.adwhirl.AdWhirlLayout package
● Add an AdWhirl layout with a code snippet similar to below.
LinearLayout layout = (LinearLayout) findViewById(R.id.layout_main);
AdWhirlLayout adWhirlLayout = new AdWhirlLayout(this, "AdWhirl SDK Key");
RelativeLayout.LayoutParams adWhirlLayoutParams =
new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
layout.addView(adWhirlLayout, adWhirlLayoutParams);
layout.invalidate();
"
I have added this code to my app, but I cannot get any ads to display. I DID import the package and I DID replace the "AdWhirl SDK Key" bit with my SDK Key so I know that is not the issue. I am wondering where this code snippet should be placed in my code and how I should modify this snippet to make ads work. Also, any insight as to what each piece of this code does (or is trying to do) would be extremely helpful.
Anyways, thanks for looking this over... I really appreciate.
There are several causes to your problem:
Ads is likely loaded from the server, so if there is no connection to the internet from your phone/avd, then nothing you will see. Check the logcat, some exceptions will be there in that case.
May be the code snippet is placed incorrectly. It should be placed into onCreate() method of your activity, which uses R.id.layout_main as the layout.
Some problems on AdWhirl site. But this is not likely.
Anyway, you are not stricted to use AdWhirl, so you may try another ads provider like admob and smaato.
Okay so the problem was with AdMob which I was using through AdWhirl. It took them a bit to begin sending me ads, although I'm not sure why.
I just started working on other parts of my code when I noticed that ads had appeared in the sections I had coded them into before.
So I guess the trick to this is to make sure you have all of your keys and IDs right on AdMob and AdWhirl, then sit back and wait for a bit until AdMob starts sending you stuff. Also, make sure your ads aren't inside a layout with padding as that will probably cause them to not show up.
Related
Thankyou in advance for reading this question. Im currently trying to use google admob in my apps, it is working, but i kept getting spam of Access denied finding property "vendor.oplus.media.vpp.stutter".
I put the admob code in my second page. It wont wont come up if i havent access that page. but as soon as i open the ads it wont dissapear even when im not in that second page anymore.
Im using the Google Rewarded ad btw if that helps.
My Debug Console
i already tried to comment any print statement in my code but it still wont dissapear. seems like it generated automaticly. Already tried to google it but cant find the exact same one.
i have been trying to implement Native Ads from admob.
I got some sample code from Github. I tried to implement this code, and the demo code works fine. The native ads show up properly.
I then created my own Admob account and obtained an Ad Unit ID. The previous demo code for native ad did not work with this id, and I got an error with error code 0 although my created Ad Unit ID works fine for banner type ads.
Are this native ads still in beta?? when are they supposed to be out for the common developer?
Helllom I have the same problem but I dont think the real problem be the space. I'm not sure but maybe Native Ads Advanced are still in beta. I try the same code with the Ad Unit ID from admob's example and it works fine. You can try the examples code with your ad units but it doesnt work for me.
What happens to me every time I create an Admob banner ad, it takes a while to appear. So i think you should check again in an hour. I'm guessing Google is processing ad unit id and this is taking some time.
Also, they're not in beta. You should be able to use them. If you still cannot see real ads, post your code and I'll take a look at it.
I hope this helps.
I am getting the exact same error. I implemented native ad code from the example given in git hub. Now I am always getting error code '0' .
Funny thing . When I replace My ad unit Id with the ad_unit_id given in Example.
Ads is displaying in my APP. So it is Clear that my implementation is Correct.
There is some problem with admob ad unit. Its been 18 hour since I created it, I am still getting error with my ad_unit.
If it is ad_unit activation problem then , How would I know it is ready or not , or i have to create some other new ad_unit.
I have an Android education App where user can hold "tokens" to earn new contents and features.
I searched at Admob documentation but the information seems to be not very clear about my situation.
In case to create a button to open Admob interstitial in return of any tokens mentioned above (I'm thinking make this feature periodic), should it generate invalid traffic or break any admob rule? Anyone tried it before?
My doubt consist in the fact that it does not generate invalid clicks, it just improve the number of interstitials showed.
Thanks in advice.
Ok, concerning to your reply I'm pretty sure that this is not allowed. What I can tell you for sure is that you must not reward people for clicking your ads (or even a button which shows ads).
In addition to it, this is not a "natural transition point". Read what AdMob proposes about showing interstitials: https://developers.google.com/admob/android/interstitial?hl=en#some_best_practices
i am having problems in showing ads on my android app. I am able to show ads using this
AdView adview = (AdView)findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().
addTestDevice("127544499E3830865BD4E63234B4CC99").build();
adview.loadAd(adRequest);
But when i wanted to show real ads, i removed this
addTestDevice("127544499E3830865BD4E63234B4CC99")
but now its showing nothing, just plain white. So anybody have idea, i looked at another question but nothing works, everything this correct from my admob account and i am also having permissions,activity & meta in my manifest.
Look at your logcat, it will tell you why you aren't showing any ads. It's probably because there aren't any to show right now. This is a normal situation.
You have removed the ad id number so it has nothing to show. You are supposed to insert your number that you generated on admob page.
There is a tutorial: https://developers.google.com/mobile-ads-sdk/docs/admob/android/quick-start
I was able to solve the situation, this was happening because of the device it self. I mean only on that device later when i gave this a little time and tested it on other device. It just worked great.
Thanks everyone for the suggestion.
I want to know if there is a possibility to force the orientation of an Admob Banner (4.3.1) for Android. My game force the player to play in landscape, but I would like to put the Ad at the vertical. Like this the Ad will destroy less space on the screen and I can put the ad at a better place to get clicks.
I already saw games like this, but I don't remember which one... Oh, and my Ad is only on a XML file, so if I can use it without JAVA code, it would be excellent.
I found nothing on my research :S
Thanks
Unfortunately, AdMob does not support a 50x320 creative.
You can flip it, but the content will still be in a different orientation. And this should be done probably in the code. I don't exactly know hoe.
This link might help