This is a sample activity which shows how to use AdMob Manager in your application.
Basic description of algorithm in step by step form:
1.) Register or login at admob.com, and download GoogleAdMobAdsSdkAndroid-4.0.4, which contains a GoogleAdMobAdsSdk.jar file.
2.) Create a project MyAdMob.
3.) In your project’s root directory create a subdirectory lib. Copy the AdMob JAR (GoogleAdMobAdsSdk.jar) file into that lib directory.
4.) Right-click on your project from the Package Explorer tab and select Properties.
5.) Select Java Build Path from left panel and Select Libraries tab from the main window.
6.) Click on Add JARs.
7.) Select the JAR copied to the libs directory, Click OK to add the SDK to your Android project.
8.) Add some relevant permissions in AndroidManifest.xml:
1.) Open Eclipse. Use the New Project Wizard and select Android Project Give the respective project name i.e. MyAdMob. Enter following information:
Project name: MyAdMob
Build Target: Android 2.1
Application name: MyAdMob
Package name: com.sample.MyAdMob
Create Activity: MyAdMob
On Clicking Finish MyAdMob code structure is generated with the necessary Android Packages being imported along with MyAdMob.java. MyAdMob class will look like following: