• Tutorials
  • Tips & Tricks
  • Applications
  • News

Android Trainee

  • Tutorials
  • Tips & Tricks
  • Applications
  • News
Home  /  Tutorials  /  How to implement mopub Ads In Android Application?
17 February 2015

How to implement mopub Ads In Android Application?

Written by admin@androidtrainee
Tutorials Leave a Comment

About :-

Drive More Mobile Ad Revenue

MoPub is a hosted ad serving solution built specifically for mobile publishers.

Grow your mobile advertising business with powerful ad management, optimization and reporting capabilities, and earn revenue by connecting to the world’s largest mobile ad exchange.

Platform :-

  • iOS
  • Android

Payment Method & Terms :-

if Your account balance is less than US$50 (the “Termination Threshold”), such earned balance below the Termination Threshold will not be paid and will automatically be forfeited and MoPub will own any such amounts. If Your earned balance at the time of expiration or termination is greater than the Termination Threshold, MoPub will remit the amount earned within approximately 90 days of the end of the month of expiration or termination to You. MoPub will attempt to pay You for undisputed amounts earned and unpaid, however, if MoPub is unable to remit payment to You due to You or circumstances beyond MoPub’s control, You will automatically forfeit all such amounts and MoPub will own any such amounts.

 

—> Frist Open mopub Account And Get Banner ID.

 

After Getting All Information  Start Eclipse And Create New Project.

 

—>  AndroidManifest.xml

 


 

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

 

<activity android:name="com.mopub.mobileads.MoPubActivity" android:configChanges="keyboardHidden|orientation|screenSize"/>
<activity android:name="com.mopub.mobileads.MraidActivity" android:configChanges="keyboardHidden|orientation|screenSize"/>
<activity android:name="com.mopub.common.MoPubBrowser" android:configChanges="keyboardHidden|orientation|screenSize"/>
<activity android:name="com.mopub.mobileads.MraidVideoPlayerActivity" android:configChanges="keyboardHidden|orientation|screenSize"/>
<activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<activity android:name="com.millennialmedia.android.MMActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboardHidden|orientation|keyboard" />
<activity android:name="com.millennialmedia.android.VideoPlayer" android:configChanges="keyboardHidden|orientation|keyboard" />

 

 

–> For Banner Ads Open Layout.xml File.


<com.mopub.mobileads.MoPubView
android:id="@+id/adview"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_alignParentBottom="true"
/>

 

open MyActivity.java file…


 

import com.mopub.mobileads.MoPubView;

import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

public class MainActivity extends ActionBarActivity {
private MoPubView moPubView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
moPubView = (MoPubView) findViewById(R.id.adview);
moPubView.setAdUnitId("f314053636cd47368c0ac2af8a5b39c7");
moPubView.loadAd();

}

 

protected void onDestroy() {
moPubView.destroy();
super.onDestroy();
}

}

 

—> Run Your Code.

 

s1

admin@androidtrainee

 Previous Article How to implement millennialmedia Ads In Android Application?
Next Article   How to implement Tapjoy Ads In Android Application?

Related Posts

  • Android New Quick Action Animation.

    July 15, 2015
  • Android satellite menu Animation.

    July 15, 2015
  • Android Staggered Grid & List View.

    July 14, 2015

Leave a Reply

Cancel reply

Tags

admob Advertising Networks AerServ Airpush android android ads android Advertising Networks Android App android chart animation Android GridView android L android lollipop androidmapv2 AppBrain AppFlood Appia AppKey Appnext AppOptim Appwiz chart chartview Epom Market google place api GridView Image Loader InMobi LeadBolt location map mapv2 mapv2 api material design Minimob Mobicow MobileCore MobiMicro NativeX Pingjam RevMob StarApplication startapp TapContext touched location Widdit

Count per Day

  • 150Reads yesterday:
  • 463914Total visitors:
  • 19Visitors today:
  • 2507Visitors per month:
  • 1Visitors currently online:
© Copyright 2014. Theme by BloomPixel.
Posting....