(iklan)
Breaking News
Loading...
Thursday 29 January 2015

How to Add ads to your Android application Using Admob

22:52
300x250 Microsoft | Sofware | How to Add ads to your Android application Using Admob, for developers who are interested to earn money using advertising. Use this guide to understand how to use AdMob to add ads on Android. Follow the steps like below:


Step 1 Create an AdMob account with down http://www.admob.com


Step 2 Once your AdMob account is created, log in to your account


Step 3 Click on the site & amp; Apps tab on the top menu. Then click the Add Site / App to add application you want your ad to appear in


Step 4 Select the application you created the platform is, in this case select Android


Step 5 Enter the required details to add an application to the list. You should already know the name of the application and the name of the package for your application. Therefore, write the name of your application in the application name field, and write the URL android package because the market :? // Details id = <package name = "">. Enter the name of your package by replacing <package name = "">. To select the type of app categories your application, and write a small description in the description box to tell what type of application it is. There is also the option to insert Google ads, which can be useful to get a charge when the ad AdMob ad is not displayed.



Step 6 Once you hit continue, AdMob will add your application to the list and ask you to download the Android SDK AdMob. Click on the download button to download the SDK.


Step 7, while AdMob SDK is downloading, click on to go to the site / Apps button to return to your application list, then click on manage settings in the applications listed to find your publisher ID.Save this information for future use in Eclipse to include in your application AdMob.

Step 8, extract the downloaded ZIP file to the Android AdMob SDK to a location that is easily accessible.


Step 9 Now start your Eclipse IDE to import the SDK download. Find the folder that contains your Android apps and right click to select the properties option.


Step 10 Select "Java Build Path" option from the navigation plan to the left and then click on the "library tab" to add the SDK files. Click "Add External Jars ..." button and locate the unzipped AdMob SDK JAR on your disk, and add it to your project.


Step 11 If you successfully complete the previous steps, you should now see the JAR file is located under the Reference Library folder in your project.


Step 12 Once the SDK will be added to your project, open the AndroidManifest.xml file located in your project. To use AdMob in your application, you must include the following xml Just before the & lt; / application & gt; tags incorporate new activities to com.google.ads.AdActivity to add this xml <activity android. = ""android:configchanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" name = "com.google. ads.AdActivity"> "

 


Step 13. After & lt; / application & gt; tags enter the license required by AdMob <uses-sdk android: = "" minsdkversion = "7"> <using android: = "" permission = "" name = "android.permission.INTERNET"> <use: = "" android = "" permission = "" name = "android.permission.ACCESS_NETWORK_STATE">

Step 14 Open the file in a folder of your application Android project.properties and change this line of code at the end of the AdMob SDK files to make work. AdMob SDK requires android SDK-13, and since our application is SDK-7 we need to change the version of the target, the target = android-13.

Step 15 Finally, to add AdMob ads to your application, open the layout xml file that you want. For this tutorial we will only add to our main.xml located under res / layout folder of our project. Then add the following xml where you want to display your ads in your layout.

In <LinearLayout> tag adds xmlns: ad = "http://schemas.android.com/apk/lib/com.google.ads" After the <LinearLayout> add <com .google.ads.adview = "" adsize = "BANNER" adunitid = "YOUR PUBLISHER ID" android: = "" id = "@ + id / AdView" ad: = "" layout_height = "wrap_content" layout_width = "wrap_content" loadadoncreate = "true"> </ com> </ LinearLayout> </ LinearLayout> </ use> </ use> </ uses-sdk> </ activity> </ name> </ name>

Source http://halaman-pengetahuan.blogspot.com/2014/10/cara-tambahkan-iklan-ke-aplikasi.html

(iklan)

0 komentar:

Post a Comment

 
Toggle Footer