B4A Library AdMob library

GMan

Well-Known Member
Licensed User
Longtime User
Yes - NO update
 

Ratna Fang

Member
Licensed User
Longtime User
erel, i've just downloaded the 2.0.
does it has new capability to show other type of ad (such as interstitial)?
 

canalrun

Well-Known Member
Licensed User
Longtime User

Hello,
I am a little confused by this answer.

You stated above that you tested with 2.2 (API level 8). But in the Admob 2.0 tutorial it says "AdMob library requires Android SDK level 13 or above".

I am asking because currently about 16% of my installs come from devices running APIs less than 13.

Does the new Admod 2.0 library work on devices running 2.2 (API level 8) and above?

Can you explain the apparent contradictions in the statements above? (Tested with 2.2, requires SDK level 13 or above)
Does one mean "to compile" and the other "to run"?

This quote from Google says the Play Services Library version supports the same devices.


Barry.
 

ivanomonti

Expert
Licensed User
Longtime User
ERROR MANIFEST

B4X:
Parsing code.  0.00
Compiling code.  0.02
Compiling layouts code.  0.01
Generating R file.  Error
AndroidManifest.xml:23: error: Error: String types not allowed (at 'configChanges' with value 'keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize')
.
 

eps

Expert
Licensed User
Longtime User

How have you edited the manifest?

Using Tools --> Editor?

B4X:
AddApplicationText(

 <activity android:name="com.google.ads.AdActivity"

  android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>)

It looks like a case of a missing quote or quote in the wrong place.
 

apty

Active Member
Licensed User
Longtime User
How can i use interstitial ads with this library. i am using google play services in my app
 

apty

Active Member
Licensed User
Longtime User
that library generates an error if you use it with play services.
B4X:
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lcom/google/ads/AdRequest$ErrorCode;
    at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:122)
    at com.android.dx.dex.file.DexFile.add(DexFile.java:161)
    at com.android.dx.command.dexer.Main.processClass(Main.java:685)
    at com.android.dx.command.dexer.Main.processFileBytes(Main.java:634)
    at com.android.dx.command.dexer.Main.access$600(Main.java:78)
    at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:572)
    at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:596)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:498)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:264)
    at com.android.dx.command.dexer.Main.run(Main.java:230)
    at com.android.dx.command.dexer.Main.main(Main.java:199)
    at com.android.dx.command.Main.main(Main.java:103)
1 error; aborting
    Optimized dexer failed. Switching to Standard dexer.
 

eps

Expert
Licensed User
Longtime User
Then post on that thread... but it looks like you've got Admob (this one) and the Admob Beta library (that one) installed - maybe only have one?
 

eps

Expert
Licensed User
Longtime User
Someone else, on that thread, had the same problem as you, have you read the whole of that thread?
 

aeropic

Active Member
Licensed User
Longtime User
Hi,
I switched to admob2.0 and it is working fine but I get a weird behaviour, the admob banner is "shacky". I mean it is following the phone orientation, if you look the phone with an orientation perpendicular to the screen, the banner is rectangular. When you look the screen from the rigth side, the banner shifts a bit to the left and takes the shape of a parallelogram ...

I wonder if this is normal but also how do they do this ? Using gyro ?

On my galaxy S3 this effect is obvious...


edit : another side effect of admob2.0 is the huge footprint (added around 1Mb compared to the previous version)
eg : torchunlock old admob: 759 kB
admob 2.0: 1636 kB
 
Last edited:

aeropic

Active Member
Licensed User
Longtime User
I tried with another application (knigth's ride) which does not use any sensor and I get the same result.
Even playing with the orientation of the screen, shaking it right left when the devise is set horizontal, I can make the ad banner fully shrink.




That's the weirdest thing I saw today, and the ad says "begin to flirt today ...", maybe not with admob 2.0 !!!

Here is the piece of code I use (the same that with the old version):
B4X:
AdView1.Initialize("Ad", "ca-app-pub-mynumber") 'publisher id that you received from AdMob.
    Activity.AddView(AdView1, (100%x - 320dip)/2, 0dip, 320dip, 50dip)
    AdView1.LoadAd 'loads an ad


edit : this shacky behavior is not due to admob2.0... it did exist with the older version...
 
Last edited:

GMan

Well-Known Member
Licensed User
Longtime User
maybe not with admob 2.0 !!!

MAY BE - some other also changed back to the old version, i never updated in case of this problems.
Also i often use LeadBold
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…