Hi, I signed up for an admob account. Got an ap-id after creating a top banner.
I then proceeded to update android sdk, and eclipse plugin. Then downloaded the admob 1.40 library, and downloaded the GoogleAdMobAdsSdk-6.4.1.jar (renamed this to GoogleAdMobAdsSdk.jar) and copied them both to basic4android/Additional libraries...
I used NJdude's code (thanks!)
substituted "xxxx" with my ap-id.
It compiles alright, but I get stuck on as it starts up.
I get a java.lang.NullPointerException.
I then proceeded to update android sdk, and eclipse plugin. Then downloaded the admob 1.40 library, and downloaded the GoogleAdMobAdsSdk-6.4.1.jar (renamed this to GoogleAdMobAdsSdk.jar) and copied them both to basic4android/Additional libraries...
I used NJdude's code (thanks!)
B4X:
Adbox.Initialize2("Ad", "xxxxx", Adbox.SIZE_BANNER)
Activity.AddView(Adbox, 0dip, Activity.Height - 50dip, Adbox.Width, Adbox.Height)
Adbox.LoadAd
ToastMessageShow("Width=" & Adbox.Width, True)
ToastMessageShow("Height=" & Adbox.Height, True)
substituted "xxxx" with my ap-id.
It compiles alright, but I get stuck on as it starts up.
B4X:
Activity.AddView(Adbox, 0dip, Activity.Height - 50dip, Adbox.Width, Adbox.Height)
I get a java.lang.NullPointerException.