Android Question AdMob dont working on old devices

Discussion in 'Android Questions' started by Douglas Farias, Jul 15, 2015.

  1. Douglas Farias

    Douglas Farias Expert Licensed User

    Hi all
    I m tested today on a old device my app, and i see the admob dont work, the ad dont show on this old device. android version is 2.3.6

    Admob its working fine on my devices 4.0+ but not on the 2.3.6 (i dont know 3.0+)

    my manifest its normal i think

    Anyone know this, have this same problem? how load admob on old devices?

    NOTE: Interstitial works fine, only banner not
     
    Last edited: Jul 15, 2015
  2. DonManfred

    DonManfred Expert Licensed User

  3. Douglas Farias

    Douglas Farias Expert Licensed User

    FIXED

    i have change
    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)
    to

    Code:
    adbox.Initialize("Ad""xxxxxxxxxxx")
    Activity.AddView(adbox, (Activity.Width - 320dip) / 2 , 75%y320dip50dip)
    now works on Android 2.3+, i think the problem its on SIZE_SMART_BANNER or on initialize2
    Thx Solved
     
  4. sorex

    sorex Expert Licensed User

    notice that it will only work with a screen width of minimum 320 pixels.

    I also have a phone that has 240x400 and it won't show there I've read on their site.
     
    Douglas Farias likes this.
  5. Douglas Farias

    Douglas Farias Expert Licensed User

    hmm my case its landscape i think hav no problems.
    but this is a problem for portrait use, (SIZE_SMART_BANNER) dont work on old devices, and cant add 320 o_O
     
Loading...