AdMob library requires Android SDK level 13 or above. You will need to download it with the SDK Manager and then choose Tools - Configure Paths and choose android.jar from platforms\android-13. Google has released a new Ads SDK based on Google Play Services. The new SDK requires B4A v3.20. AdMob v2.x (Google Play Services) instructions: 1. Register your app and get an ad unit id (PublisherId). 2. Download and copy google-play-services.jar as explained in steps 1 and 2 here: http://www.basic4ppc.com/android/forum/threads/google-maps-android-v2-tutorial.24415/#content 3. Add the following attribute to the project (change the path based on your installation): Code: #AdditionalRes: C:\android-sdk-windows\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms 4. Add the following manifest editor code: Code: 'AdMobAddApplicationText(<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/> <activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>)'End of AdMob 5. Add an AdView view to your project: Code: Sub Process_Globals End SubSub Globals Dim AdView1 As AdViewEnd SubSub Activity_Create(FirstTime As Boolean) AdView1.Initialize("Ad", "<Ad Unit Id>") Activity.AddView(AdView1, 0dip, 0dip, 320dip, 50dip)' AdView1.LoadAd 'loads an ad AdView1.LoadAdEnd SubSub Activity_Pause (UserClosed As Boolean) AdView1.PauseEnd SubSub Activity_Resume AdView1.ResumeEnd SubSub Ad_FailedToReceiveAd (ErrorCode As String) Log("failed: " & ErrorCode)End SubSub Ad_ReceiveAd Log("received")End SubSub Ad_AdScreenDismissed Log("screen dismissed")End Sub AdMob v1.x (old version) instructions: Installing AdMob libraries: 1. Go to AdMob - Register and register to AdMob. 2. Add an application: The url can be a placeholder for a future application. 3. After creating the application you should see a screen with your "Publisher ID" and a link to "get publisher code". Later you will need to enter your publisher id in the program code. Now you should download AdMob SDK by pressing on "get publisher code". You will download a zip file with a name similar to: GoogleAdMobAdsSdk-4.0.4.zip. Inside the zip there is a folder with the same name. Inside this folder you will find the required jar file (GoogleAdMobAdsSdk-x.x.x.jar). Note that you may have problems extracting the whole zip file because it contains a folder and a file with the same name. The solution is to just drag the required file. Rename the jar file and change its name to GoogleAdMobAdsSdk.jar (removing the specific version suffix). 4. Download AdMob B4A library. You should copy all files to the additional libraries path. 5. Copy GoogleAdMobAdsSdk.jar to the additional libraries path. Adding AdMob to your application 1. Add a reference to AdMob library. 2. Typical code should look like: Code: Sub Process_Globals End SubSub Globals Dim AdView1 As AdViewEnd SubSub Activity_Create(FirstTime As Boolean) Activity.LoadLayout("1") AdView1.Initialize("Ad", "YourPublisherId") 'publisher id that you received from AdMob. Activity.AddView(AdView1, 0dip, 0dip, 320dip, 50dip) '[B]previously the height was 48dip. Now it is 50dip. [/B]AdView1.LoadAd 'loads an adEnd SubSub Ad_FailedToReceiveAd (ErrorCode As String) Log("failed: " & ErrorCode)End SubSub Ad_ReceiveAd Log("received")End SubSub Ad_AdScreenDismissed Log("screen dismissed")End Sub - AdView1 size must be 320dip x 50dip, otherwise it will not display. The above code puts an ad at the top of the screen. You can change the Visible property and hide or show the ad. Manifest editor The following code should be added to the manifest editor: Code: 'AdMobAddApplicationText(<activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>)'End of AdMob Some tips: - AdMob writes debugging messages to LogCat. However you will not see those messages when LogCat is filtered. Uncheck the "filter" check box and look for these messages. - On the emulator a test ad should appear instead of a real ad. - Many times, especially when you start, AdMob will not return any ads. LogCat should display something like: Code: failed. No ad to show. After awhile it should start working. If it doesn't work you should make sure that the package name matches the value defined in "package url" in AdMob site.