B4A Library AdMob library

Discussion in 'Additional libraries, classes and official updates' started by Erel, Jan 12, 2011.

  1. Erel

    Erel Administrator Staff Member Licensed User

    This library requires some configuration. Please see the tutorial: http://www.basic4ppc.com/forum/basi...-admob-tutorial-add-ads-your-application.html

    Reference: Basic4android - AdMob

    AdMob v2.00 - Based on Google Play Services. This version requires B4A v3.20.

    AdMob v1.40 - Add support for SIZE_SMART_BANNER.
    These ads will fill the whole available width: https://developers.google.com/mobile-ads-sdk/docs/admob/smart-banners

    You can use the following code:
    Code:
    Adview1.Initialize2("Ad""xxxxxxxx", AdView1.SIZE_SMART_BANNER)
    Dim height As Int
    If GetDeviceLayoutValues.ApproximateScreenSize < 6 Then
       
    'phones
       If 100%x > 100%y Then height = 32dip Else height = 50dip
    Else
       
    'tablets
       height = 90dip
    End If
    Activity.AddView(AdView1, 0dip100%y - height, 100%x, height)
    See this post for an additional requirement if using google play services v28: http://www.b4x.com/android/forum/threads/admob-library.7301/page-10#post-381519
     

    Attached Files:

    Last edited: Nov 18, 2015
    CapVidia, Theera, GMan and 1 other person like this.
  2. bluedude

    bluedude Well-Known Member Licensed User

    AdMob

    Awesome!
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    There was a typo in AdMob.SetTestDevices method which broke it. Please replace it with the updated library.
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    AdMob v1.1 is attached to the first post.
    See the tutorial for more information.
     
  5. Amalkotey

    Amalkotey Active Member Licensed User

    Missing jar file in library

    Hi Erel,

    After installing the AdMob library v1.10. I get the message when starting the IDE:

    Code:
    Misising jar file for library:
    E:\Basic4Android\libraries\GoogleAdMobAdsSDK.xml
    The jar file is missing from the zip file. Please check times the zip file.

    best regards
    Amalkotey
     
    Last edited: Mar 23, 2011
  6. Erel

    Erel Administrator Staff Member Licensed User

  7. susu

    susu Well-Known Member Licensed User

    Do I need to update my apps with new Admob library, Erel?
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    I didn't find any formal information about the SDK change.
    I believe that AdMob will continue to support requests from the old SDK.

    For new projects I recommend you to use the new SDK.
     
  9. susu

    susu Well-Known Member Licensed User

    Thanks Erel. But I noticed that my renevue is dropping from about $1/day to $0.1/day :(
     
  10. jndaniels1

    jndaniels1 Member Licensed User

    Try renaming the jar file to: GoogleAdMobAdsSDK.jar

    .JND.
     
  11. Gmankelow

    Gmankelow Member Licensed User

    Downloading the AdMob.zip

    I cannot download the Admob zip, clicking on it says I have insufficient permission and if I do right click save as it is not the true zip?

    Is it for Licensed users only?
     
  12. agraham

    agraham Expert Licensed User

    eps likes this.
  13. Gmankelow

    Gmankelow Member Licensed User

  14. susu

    susu Well-Known Member Licensed User

    Admob informed that my apps got "code update available" although I used Admob lib v1.1 already. So Admob lib need to be upgraded?
     
  15. Erel

    Erel Administrator Staff Member Licensed User

    The Google SDK was updated. You should download the updated SDK and replace the jar file (the AdMob library doesn't need to be changed.)
     
  16. susu

    susu Well-Known Member Licensed User

    Thank you, Erel.
     
  17. Omar

    Omar Member Licensed User

    Just a quick question, is it necessary to update the Google JAR file in the additional libraries folder each time for every new application or can we retain the same file for new applications also?
     
  18. Erel

    Erel Administrator Staff Member Licensed User

    You can use the same Jar for all applications.
     
  19. Omar

    Omar Member Licensed User


    Thank you Erel!
     
  20. Inman

    Inman Well-Known Member Licensed User

    Got an email from Admob today announcing a new update:

    I am wondering if this calls for any changes to the B4A Admob wrapper.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice