FORUMS
Mario7795's Avatar

[Q] How to insert admob in app help me

Thanks Meter: 0
 
By Mario7795, Junior Member on 25th April 2014, 09:15 AM
Post Reply Subscribe to Thread Email Thread
25th April 2014, 09:15 AM |#1  
OP Junior Member
Thanks Meter: 0
 
More
hi guys
could you help me to put the banner in my app.
I also followed the guides but I still can not insert
You might even see me lines of code please
thanks
 
 
25th April 2014, 02:08 PM |#2  
amank22's Avatar
Junior Member
Flag greater noida
Thanks Meter: 6
 
More
what problem are you getting????
28th April 2014, 09:57 PM |#3  
coolbud012's Avatar
Senior Member
Flag Bangalore
Thanks Meter: 25
 
More
Atleast tell the problem or provide the code where you are facing problem.
5th May 2014, 08:44 PM |#4  
Junior Member
Thanks Meter: 6
 
More
Simple:
1) Install Google AdMob Ads SDK (you can use Android SDK Manager for that)
2) Add GoogleAdMobAdsSdk.jar to your project (Project Properties>>Java Build Path>>Add External JARs…)
3) In the Manifest add ACCESS_NETWORK_STATE and INTERNET permissions, and also an activity inside application tag, like that:

Code:
<uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <application
        android:debuggable="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:label="@string/app_name"
            android:name=".BillingSampleActivity" >
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:name="com.google.ads.AdActivity" />
    </application>
4) Get Publisher ID from AdMob
5) Add banner to your layout
Code:
<com.google.ads.AdView
     android:id="@+id/adView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            ads:adSize="BANNER"
            ads:adUnitId="your_admob_publisher_id"
            ads:loadAdOnCreate="true" />

Thats it!
25th July 2014, 07:23 PM |#5  
Junior Member
Flag Yorba Linda
Thanks Meter: 45
 
Donate to Me
More
Quote:
Originally Posted by GRYMALA

Simple:
1) Install Google AdMob Ads SDK (you can use Android SDK Manager for that)
2) Add GoogleAdMobAdsSdk.jar to your project (Project Properties>>Java Build Path>>Add External JARs…)
3) In the Manifest add ACCESS_NETWORK_STATE and INTERNET permissions, and also an activity inside application tag, like that:

Code:
<uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <application
        android:debuggable="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:label="@string/app_name"
            android:name=".BillingSampleActivity" >
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:name="com.google.ads.AdActivity" />
    </application>
4) Get Publisher ID from AdMob
5) Add banner to your layout
Code:
<com.google.ads.AdView
     android:id="@+id/adView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            ads:adSize="BANNER"
            ads:adUnitId="your_admob_publisher_id"
            ads:loadAdOnCreate="true" />

Thats it!

Nice answer! Thanks for this.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes