AdMob Alternative : Earn through Ads for Apps

Apps Developer always think that they earn through their Apps which they developed and give time to development. Some time AdMob reject the Account and our whole work for earning gone. Are you struggling to accept your AdMob account? Don’t worry below some Mobile Ads Platform for the Android with code you can earn through with best CPM and Revenue-share around 60% to 70%. So, Let’s get Start and earn money through your Apps.

No List of AdMob Alternatives
1 AdSense
2 MobFox
3 MoPub
4 LeadBolt
5 Smaato
6 inMobi
7 Facebook Audience Network
AdMob Alternative Earn through Ads for Apps

AdMob Alternative Earn through Ads for Apps

AdSense
  • Type of Ads – Banner and Interstitial
  • Sign into your AdMob account.
  • Click on Monetize tab.
  • Select or Create the app and choose the platform.
  • Select the ad format either Banner or Interstitial and give the ad unit a name.
  • Once the ad unit is created, you can notice the Ad unit ID on the dashboard. An example of ad unit id look like ca-app-pub-0664570763252260/3326342124
  • Create as many ad units required for your app.
  • Creating New Project in Android
  • Open build.gradle and add play services dependency as AdMob requires it.
compile ‘com.google.android.gms:play-services-ads:8.4.0’
  • Add the Ad unit IDs to your strings.xml. Open strings.xml located under res ⇒ values and add the ad units of both Banner and Interstitial.
strings.xml
 <resources>
 <string name="app_name">AdMob</string>
 <string name="title_activity_second_activiy">Interstitial</string>
 <string name="msg_welcome">Welcome to Admob. Click on the below button to launch the Interstitial ad.</string>
 <string name="btn_fullscreen_ad">Show Fullscreen Ad</string>

<!-- AdMob ad unit IDs -->
 <string name="banner_home_footer">ca-app-pub-0664570763252260/3326522424</string>
 <string name="interstitial_full_screen">ca-app-pub-0664570763252260/1769900428</string>

</resources>

Open AndroidManifest.xml and add the below mentioned permissions and other properties.

  • Add INTERNET & ACCESS_NETWORK_STATE permissions.

Adding Banner Ad

https://developers.google.com/admob/android/banner
 <com.google.android.gms.ads.AdView
     android:id="@+id/adView"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     ads:adSize="BANNER"
     ads:adUnitId="@string/banner_home_footer">
 </com.google.android.gms.ads.AdView>
  • Open MainActivity.java and modify the code as shown.
  • Create an instance of AdRequest and load the ad into AdView.
  • Ad the AdView life cycle methods in onResume(), onPause() and in onDestroy() methods.
package info.imperialinfosys.admob;
import com.google.android.gms.ads.AdListener;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;

public class MainActivity extends AppCompatActivity {

private AdView mAdView;
private Button btnFullscreenAd;

@Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.activity_main);

   mAdView = (AdView) findViewById(R.id.adView);
   AdRequest adRequest = new AdRequest.Builder().build();
   mAdView.loadAd(adRequest);

   btnFullscreenAd = (Button) findViewById(R.id.btn_fullscreen_ad);
   btnFullscreenAd.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
      startActivity(new Intent(MainActivity.this, SecondActivity.class));
    }
   });
 }

@Override
 public void onPause() {
  if (mAdView != null) {
    mAdView.pause();
  }
 super.onPause();
 }

@Override
 public void onResume() {
  super.onResume();
  if (mAdView != null) {
   mAdView.resume();
  }
 }

@Override
 public void onDestroy() {
  if (mAdView != null) {
   mAdView.destroy();
  }
  super.onDestroy();
 }
}

 

MobFox

Step 1 – Signup for the Advertise Platform

Step 2 – Add your App/Site

Step 3 – Get your Unique MobFox Inventory Hash (e.g. 633de4b0c14ca52ea2432a3c8a5c4c31)

Step 4 – Ad Request URL – curl “http://my.mobfox.com/request.php?rt=api&”

Step 5 – AdStyle | Format

  • Video
  • Native
  • Interstitial and Banner Ads
  • Rich Media

For https://github.com/mobfox

https://docs.mobfox.com/

Demo App for Ads Showcase – Google Play Store

MobFox Compared with Other Mobile Ad Servers

Publishers Section Table

MobFox Stpes of Implementation in Android Apps

  • MobFox supports Android OS 4.1.x (Jelly Bean) and up.
  • Add JitPack to your repositories, if missing. In your build.gradle:
allprojects {
  repositories {
  //... other repositories ...
  maven { url "https://jitpack.io" }
  }
}
  • Next, You have to add Google Play Services and MobFox-Android-SDK-Core to your compile dependencies:
dependencies {
   //... other dependencies ...
   compile 'com.google.android.gms:play-services-ads:+'
   compile 'com.github.mobfox:MobFox-Android-SDK-Core:3.0.6'
}
  • You have to add permissions in your AndroidManifest.xml file
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>

<application
   <!--mobfox interstitial activity-->
   <activity android:name="com.mobfox.sdk.interstitialads.InterstitialActivity"></activity>
</application>

Banner Ads of MobFox in Android

  • Add Activity’s Layout of Banner Ads.
<com.mobfox.sdk.bannerads.Banner
   android:layout_width="300dp"
   android:layout_height="250dp"
   android:id="@+id/banner"
   android:layout_centerHorizontal="true"
   android:layout_centerVertical="true">
</com.mobfox.sdk.bannerads.Banner>
  • In, your Main Activity you have to add below code for where ads appear and pause
import com.mobfox.sdk.bannerads.Banner;
import com.mobfox.sdk.bannerads.BannerListener;

// ...

Banner banner;

@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);

  banner = (Banner) findViewById(R.id.banner);

  final Activity self = this;
   banner.setListener(new BannerListener() {
    @Override
    public void onBannerError(View banner, Exception e) {
      Toast.makeText(self, e.getMessage(), Toast.LENGTH_SHORT).show();
    }
    @Override
    public void onBannerLoaded(View banner) {
      Toast.makeText(self, "loaded", Toast.LENGTH_SHORT).show();
    }
    @Override
    public void onBannerClosed(View banner) {
      Toast.makeText(self, "closed", Toast.LENGTH_SHORT).show();
    }
    @Override
    public void onBannerFinished() {
       Toast.makeText(self, "finished", Toast.LENGTH_SHORT).show();
    }
    @Override
    public void onBannerClicked(View banner) {
       Toast.makeText(self, "clicked", Toast.LENGTH_SHORT).show();
    }
    @Override
    public void onNoFill(View banner) {
      Toast.makeText(self, "no fill", Toast.LENGTH_SHORT).show();
    }
 });
 banner.setInventoryHash("<your-publication-hash>");
 banner.load();
}

//permission dialog for marshmello and above
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
   banner.onRequestPermissionsResult(requestCode, permissions, grantResults);
}

//add this so video ads will work properly
@Override
protected void onPause() {
  super.onPause();
  banner.onPause();
}

@Override
protected void onResume() {
  super.onResume();
  banner.onResume();
}
MoPub

MoPub specially for the Mobile Ads. MoPub is acquired by Twitter.

MoPub give Marketplace Revenue Share: 60% to publisher and other features included like

  • Free and unlimited promotional line items
  • Free and unlimited network line items
  • Free and unlimited direct-sold impressions

Add MoPub in build.Gradle file

buildscript {
   repositories {
   maven { url 'https://maven.fabric.io/public' }
 }

dependencies {
  // These docs use an open ended version so that our plugin
  // can be updated quickly in response to Android tooling updates

  // We recommend changing it to the latest version from our changelog:
  // https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin
  classpath 'io.fabric.tools:gradle:1.+'
  }
}

  apply plugin: 'com.android.application'
  // Put Fabric plugin after Android plugin
  apply plugin: 'io.fabric'

repositories {
   maven { url 'https://jcenter.bintray.com' }
}
dependencies {
   compile fileTree(dir: 'libs', include: ['*.jar'])
   testCompile 'junit:junit:4.12'
   compile 'com.android.support:appcompat-v7:23.1.1'
   compile 'com.android.support:design:23.1.1'
   compile('com.mopub:mopub-sdk:4.11.0@aar') {
     transitive = true;
   }
   compile('io.fabric.sdk.android:fabric:1.3.14@aar') {
   transitive = true;
 }

Add your API Key in AndroidManifest.xml file

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
 <application
   android:allowBackup="true"
   android:icon="@mipmap/ic_launcher"
   android:label="@string/app_name"
   android:theme="@style/AppTheme" >

    <activity android:name=".MainActivity" android:label="@string/app_name" >
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
    </activity>

    <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" />
    <meta-data
       android:name="io.fabric.ApiKey"
       android:value="<FABRIC_API_KEY>"
     />
  </application>
  <uses-permission android:name="android.permission.INTERNET" />
</manifest>

Create MoPub Activity to load the Ads

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

Call your MoPub Ads in MainActivity

import io.fabric.sdk.android.Fabric;

public class MainActivity extends ActionBarActivity {
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Fabric.with(this);
    setContentView(R.layout.activity_main);
    moPubView = (MoPubView) findViewById(R.id.mopub_sample_ad);
    // TODO: Replace this test id with your personal ad unit id
    moPubView.setAdUnitId("d4a0aba637d64a9f9a05a575fa757ac2");
    moPubView.loadAd();
 }

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

LeadBolt Mobile Apps Ads platform for the Android, iOS and Mobile Website’s. LeadBolt covered 12 Platform supports. LeadBolt work in globe with big company you can also contact direct to the Publisher and Advertiser.

Ads Type | Formats of LeadBolt

  • Video Ads
  • Interstitial
  • Rewarded Video Ads
  • Custom Native Ads

Step 1

  • Registration as a Developer | Monetizer

Step 2

  • Add your Apps to the LeadBolt Platform and get your API key for the LeadBolt

Step 3

  • Download SDK of LeadBolt
  • Add the Jar file to your Android lib folder [AppTracker.jar]

Step 4

  • Add Permission to your AndroidManifest.xml File.
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<activity android:configChanges="keyboard|keyboardHidden|orientation|screenSize" 
    android:name="com.apptracker.android.module.AppModuleActivity"
    android:hardwareAccelerated="false">
</activity>
<service android:name="com.apptracker.android.track.AppTrackerService" />

Step 5

  • Call Ads in MainActivity.java file
import com.apptracker.android.listener.AppModuleListener;
import com.apptracker.android.track.AppTracker;
// Leadbolt SDK imports

public class MainActivity extends Activity {
 
   @Override
   protected void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
     setContentView(R.layout.activity_main);

     if(savedInstanceState == null) {
     // Initialize Leadbolt SDK with your api key
        AppTracker.startSession(getApplicationContext(),"YOUR_APP_API_KEY",AppTracker.ENABLE_AUTO_CACHE);
     }
     // cache Leadbolt Ad without showing it
     AppTracker.loadModuleToCache(getApplicationContext(),"inapp");
   }

   public void gameOver() {
    // call this when you want to display the Leadbolt Interstitial
    if(AppTracker.isAdReady("inapp")) {
       AppTracker.loadModule(getApplicationContext(),"inapp");
    }
  }
}

Smaato

Smaato run ads on your iOS, Android, Windows, Blackberry apps or mobile websites. Smaato gives best CPM of every impression of demand Technology.

Features of Smaato

  • Revenue increase with Dynamic Demand
  • Full Monetization Controls
  • Native Ad Builder
  • Private Marketplace
  • More Demand Partners than any other mobile ad server
  • SDK Mediation
  • Free and easy to use

Ads Formats of Smaato

  • Video
  • Native Ads
  • Expandable Banner
  • Interactive Banner
  • Standard Ads

Step 1

  • Download SDK of Smaato

Step 2

  • Unzip the SDK and copy the Smaato jar file in your Android Project lib folder.

Step 3

  • Add build.gradle file
compile fileTree(dir: 'libs', include: ['*.jar’])
compile 'com.google.android.gms:play-services-ads:7.8.+’

Step 4

  • Take Permission of use in AndroidManifest.xml file
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />

If you are using Google Play Service SDK you must have to add in AndroidManifest.xml File.

<meta-data android:name=”com.google.android.gms.version” android:value=”@integer/google_play_services_version”/>

Step 5

  • Create a Activity for Ads
    <activity android:name=”com.smaato.soma.ExpandedBannerActivity” ></activity>

Step 6

  • Create MainActivity.java
import com.smaato.soma.video.VASTAdListener;

public class MyActivity implements VASTAdListener {
 
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.myLayout);
    Video videoAd = new Video(MyActivity.this);
  }
  // Called when the banner has been loaded.
  public void onReadyToShow() {
   // TODO
   // Call this when you want to show the video ad.
   videoAd.show();
  }
 
   // Called when the ad will show.
   public void onWillShow() {
   // TODO
   }
 
   // Called when the banner has been clicked.
   public void onWillOpenLandingPage() {
   // TODO
   }
 
   // Called when Interstitial ad will be close.
   public void onWillClose() {
   // TODO
   }
 
   // called when banner failed to load.
   public void onFailedToLoadAd() {
   // TODO
   }
 }
inMobi

inMobi is the WORLD’S MOST COMPREHENSIVE VIDEO & NATIVE MONETIZATION PLATFORM FOR PUBLISHERS AND ADVERTISER. inMobi provide maximum engagement and revenue to the Publisher and for the Advertiser get user acusition.

Ads Formats of the inMobi

  • Banner Ads
  • Interstitial Ads
  • Full-screen Video Ads
  • Rewarded Video Ads
  • Native Ads

Android Apps with inMobi Ads

Step 1

  • Download Android SDK of inMobi.
  • Add SDK jar file to your Android Project in lib folder.

Step 2

  • add the library to your project’s dependencies build.gradle
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services:8.4.0'

Step 3
AndroidManifest.xml file get the permission and add the google play service

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />


<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />

Step 4

Layout Activity file.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:ads="http://schemas.android.com/apk/lib/com.inmobi.ads"
  xmlns:tools="http://schemas.android.com/tools" 
  android:layout_width="match_parent"
  android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  android:paddingBottom="@dimen/activity_vertical_margin"
  android:orientation="vertical"
  tools:context="com.inmobi.samples.BannerXMLActivity">
    <TextView android:text="@string/banner_xml_message"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />
    <com.inmobi.ads.InMobiBanner
        android:layout_width="320dp"
        android:layout_height="50dp"
        android:id="@+id/banner"
        ads:placementId="1431977751489005"
        ads:refreshInterval="60"
    />
</LinearLayout>

Step 5
Now, you can reference the banner in your code:

InMobiBanner bannerAd = findViewById(R.id.banner);

Life Cycle of the inMobi Ads Apps

/**
 * A listener for receiving notifications during the lifecycle of a banner ad.
 */
 public interface BannerAdListener {
 /**
 * Called to notify that an ad was successfully loaded.
 *
 * @param ad
 */
 public void onAdLoadSucceeded(InMobiBanner ad);
 /**
 * Called to notify that a request to load an ad failed.
 *
 * @param ad
 * @param status
 */
 public void onAdLoadFailed(InMobiBanner ad, InMobiAdRequestStatus status);
 /**
 * Called to notify that the banner ad was displayed
 *
 * @param ad
 */
 public void onAdDisplayed(InMobiBanner ad);
 /**
 * Called to notify that the User is about to return to the application
 * after closing the ad.
 *
 * @param ad
 */
 public void onAdDismissed(InMobiBanner ad);
 /**
 * Called to notify that the user interacted with the ad.
 *
 * @param ad
 * @param params
 */
 public void onAdInteraction(InMobiBanner ad, Map<Object, Object> params);
 /**
 * Called to notify that the user is about to leave the application as a
 * result of interacting with the ad.
 *
 * @param ad
 */
 public void onUserLeftApplication(InMobiBanner ad);
 /**
 * Called to notify that an action for an incentivised ad was completed.
 *
 * @param ad
 * @param rewards
 */
 public void onAdRewardActionCompleted(InMobiBanner ad, Map<Object, Object> rewards);
 }
Facebook Audience Network

Facebook Audience Network is the second bigest Ads Plaform for the Advertiser and Publisher.

Ads Formats supported by Facebook Audience Network

  • Native Ads
  • Interstitial Ads
  • Banners
  • Instream Video

Step 1

  • Include The Audience Network SDK if you have facebook SDK included then no worry The Audience Network is the part of the Facebook SDK.
  • Add following to the build.gradle file
  dependencies {
    ...
    compile 'com.facebook.android:audience-network-sdk:4.+'
  }

Step 2

  • Get the Permission of uses in AndroidManifest.xml file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sample.audiencenetworktutorial">

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

   <application
     android:allowBackup="true"
     android:icon="@mipmap/ic_launcher"
     android:label="@string/app_name"
     android:supportsRtl="true"
     android:theme="@style/AppTheme">
     ...
     <activity android:name="com.facebook.ads.AudienceNetworkActivity"
     android:configChanges="keyboardHidden|orientation|screenSize" />
     ...
   </application>
     ...
</manifest>

Step 3

  • Layout Activity file
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout
   ...
  >
  ...
  <LinearLayout
    android:id="@+id/banner_container"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:orientation="vertical"
   />
   ...
 </RelativeLayout>

Step 4

  • MainActivity.java file
import com.facebook.ads.*;

private AdView adView;

@Override
 public void onCreate(Bundle savedInstanceState) {
 ...
    // Instantiate an AdView view
     adView = new AdView(this, "YOUR_PLACEMENT_ID", AdSize.BANNER_HEIGHT_50);
 
    // Find the Ad Container
     LinearLayout adContainer = (LinearLayout) findViewById(R.id.banner_container);

    // Add the ad view to your activity layout
     adContainer.addView(adView);

   // Request an ad
     adView.loadAd();
    }
   @Override
   protected void onDestroy() {
     if (adView != null) {
      adView.destroy();
     }
   super.onDestroy();
  }

  adView.setAdListener(new AdListener() {
    @Override
    public void onError(Ad ad, AdError adError) {
    // Ad error callback
      Toast.makeText(MainActivity.this, "Error: " + adError.getErrorMessage(),
      Toast.LENGTH_LONG).show();
    }

    @Override
    public void onAdLoaded(Ad ad) {
    // Ad loaded callback
    }

   @Override
   public void onAdClicked(Ad ad) {
   // Ad clicked callback
    }
 });

// Request an ad
 adView.loadAd();
}
Conclusion 

If your account of AdMob not accepted then you can use above any platform to earn money through your Apps. If you need to earn money and have idea of the Apps need idea to implementation and earn though your idea you can contact the Developer team of Android, iOS Apps Development and Website Development [Imperial Infosys] or any other things need to know more about the code or sample’s.

Leave a Reply