Android Question New AdMob Question

Douglas Farias

Expert
Licensed User
Longtime User
How i use the new key ?

ca-app-pub-0231280482162759/5909518111


i try use this
http://www.b4x.com/android/forum/threads/admob-library.7301/#content

and this

http://www.b4x.com/android/forum/threads/admob-tutorial-add-ads-to-your-application.7300/#content


but dont work what is the problem ? i m using the
GoogleAdMobAdsSdk.jar
AdMob B4A library.
AND
'AdMobAddApplicationText(
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
)'End of AdMob

but dont work *_* what i make?






 

Douglas Farias

Expert
Licensed User
Longtime User
hi :) this is not my key i have change numbers.
i have try your project

but heighy is in red
what library you use for this ?

this is your project with the key.
But dont work too
here is the red lines and my code
thx for hel´and sory for the english i m brasilian

#Region Module Attributes
#FullScreen: False
#IncludeTitle: True
#ApplicationLabel: AdMob Sample
#VersionCode: 1
#VersionName: 1.0
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region

'Activity module

Sub Process_Globals

'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.

End Sub

Sub Globals

'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.

Dim AdBox As AdView

End Sub

Sub Activity_Create(FirstTime As Boolean)

AdBox.Initialize2("Ad", "ca-app-pub-0231280482162759/5909518111", AdBox.SIZE_SMART_BANNER)

If GetDeviceLayoutValues.ApproximateScreenSize < 6 Then

'phones
If 100%x > 100%y Then height = 32dip Else height = 50dip

Else

'tablets
If 100%x > 100%y Then height = 50dip Else height = 90dip

End If

Activity.AddView(AdBox, 0dip, 100%y - height, 100%x, height)

AdBox.LoadAd

End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub
 
Last edited:
Upvote 0

Douglas Farias

Expert
Licensed User
Longtime User
i tested in all emulators and in my tablet 2.2 and 4.1 android and dont work too =(
i think need a new code for a new ad key
 
Upvote 0
Top