I want to place a google ad in my project. But for some reason, I don't want to use Java language for this purpose. I have already tried the ads:loadAdOnCreate="true"
attribute, but I think it is not working now. Is there any idea by which I can display ads by using XML only?
You should use old library of google ads
, so that loadAdOnCreate
will be available.
loadAdOnCreate
is no longer available in new SDK, you need to write java code to display your ads.
For ads integration you can check Harshad's answer
From official Doc by Amy Quispe (AdMob SDK Team)
loadAdOnCreate was deprecated in the Google Play Services version, so you'll have to load the ad from the code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With