Hi all, I've decided to put together a easy guide for adding admob to a Buzz Touch app since I have been successful at achieving this. I'm hoping to help you guys make a couple of pennies for your time. To get started you will first need the Admob SDK. This is very easy to obtain by simply navigating to the Admob website and creating a account. Once that's all setup, log in and go to the “add sites” link and create an android site. You’ll be asked for some details on your app, if you don’t actually have it loaded into the marketplace yet, then just enter some dummy values since you can always modify these later.
On the next screen you should find a link to download the SDK, this is where we get started!
Right click name of project/ new/ new folder call it lib then copy and paste: GoogleAdMobSdk-4.1.0.jar to lib folder.Download, unzip and save the SDK to a location on your computer you will not forget. Next you will need to take the file “GoogleAdMobSdk-4.1.0.jar” and put it into the lib/ directory of your application. You’ll also need to configure your IDE to put this onto the build path in order for it to be recognised.
After that right click project and scroll to properties
Then Java Build Path/ Add JARs/ click project name/ lib/ then GoogleAdMobSdk-4.1.0.jar/ OK
In order for your app to properly maintain the Android activity stack while displaying rich advertising it must instantiate a com.google.ads.AdActivity in its AndroidManifest.xml file.
You need to add these two lines to you manifest files right before the closing application tag.
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation"/>
All Buzztouch apps need the permissions INTERNET and ACCESS_NETWORK_STATE so they should be already enabled. Double check your manifest file to be sure they are.
Next create a attrs.xml in the res/ values folder
Here is the tricky part. Since you do not have a main.xml file in your res/layout folder, you need to experiment with the layouts on the individual screens. I am going to walk you through this part. It really trial and error as to how you make your layout and if it works. I found it very easy to apply this code to every layout with the words screen or act in front of them, mind you everyones app is different so be careful where yo put your ads.
In the next picture I will display my actual act_home.xml
This way your ads run across the bottom like a footer and there is no need to mess with the tittle bar. Make sure you add xmlns:ads=http://schemas.android.com/apk/lib/com.google.ads to your layout above you ad code as in the top example on this example. Add this code to the bottom before </relativelayout> closing tag:
<com.google.ads.AdView
android:layout_height="wrap_content"
android:id="@+id/adView"
android:layout_width="wrap_content"
ads:adUnitId="YOUR_ID_HERE"
ads:adSize="BANNER"
ads:loadAdOnCreate="true"
android:layout_alignParentBottom="true">
</com.google.ads.AdView>
You’ll need to replace YOUR_ID_HERE with your publisher ID. That's easy to find, log in to your AdMob account, click on Admob, then manage the settings on your application, you’ll see the code at the top of the page.
(Also is you run ads on bottom of screen in list view layouts you will have to add a extra item to the list cause the ad covers the last item. Example if you have five videos the fifth will be covered by ad so just and a custom text or something to fill void. You will do this from Buzz Touch control panel.)
Hope you guys enjoyed this blog and make a ton of money with Admob. I have provide some screen shots to show what the ads will look like in your app.
Get this App
Also check out this blog by gereghas
for additional resources Blog
<com.google.ads.AdView
android:layout_height="wrap_content"
android:id="@+id/adView"
android:layout_width="wrap_content"
ads:adUnitId="YOUR_ID_HERE"
ads:adSize="BANNER"
ads:loadAdOnCreate="true"
android:layout_alignParentBottom="true">
</com.google.ads.AdView>
You’ll need to replace YOUR_ID_HERE with your publisher ID. That's easy to find, log in to your AdMob account, click on Admob, then manage the settings on your application, you’ll see the code at the top of the page.
(Also is you run ads on bottom of screen in list view layouts you will have to add a extra item to the list cause the ad covers the last item. Example if you have five videos the fifth will be covered by ad so just and a custom text or something to fill void. You will do this from Buzz Touch control panel.)
Hope you guys enjoyed this blog and make a ton of money with Admob. I have provide some screen shots to show what the ads will look like in your app.
Get other Apps by us
for additional resources Blog







