Sunday, 6 November 2016

LeadBolt Ads in Android Studio


In this Tutorial i will tell you how add Leadbolt ads in your android studio project. I will try my ads what some ads only 1 or 0.50$ eCPM. But lead bolt has good eCPM 3 to 4$. So you can try it. This LeadBolt ads Tutorial you do not need to add sdk in your project. But it is your choice you also add sdk in your project. This tutorial is helpful for you you can directly Sign Up LeadBolt. This tutorial is  for leadbolt ads in webview. So firstly Create new project and add these lines in 
 In webview ads you need one html banner code for HTML Click Add Section -------- click -------html code and select any size and ok code click
activity_main.xml
<WebView
        android:id="@+id/webview"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true" />

Add these line in your activity mean MainActivity.java or any other activity

MainActivity.java 

import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.webkit.WebView;

/**
 * Created by Sahil on 11/6/2016.
 */
public class Third extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.third);
        WebView wv = (WebView) findViewById(R.id.webview1);
        wv.getSettings().setJavaScriptEnabled(true);
        wv.setBackgroundColor(Color.TRANSPARENT);
        String html = "<html><body style='margin:0;padding:0;'><script type='text/javascript' src='http://ad.leadboltads.net/show_app_ad.js?section_id=your_ad_id_here'></script></body></html>";
        wv.loadData(html, "text/html", "utf-8");

    }
}
 Last step add permission in 

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


Your ads are complete you can run the project you think  this tutorial is helpful for you please share with friends and You can Sign up Developers Leadbolt directly this link
are you a advertiser so you can sign up this link  LeadBolt Advertiser Sign Up
leadbolt interstitial, native , rewarded video ads tutorial u can contact me at skype. My skype id is  bhatiasahil2 You also contact me at whatsapp my whatsapp number is 7298291595
http://www.infolinks.com/join-us?aid=2940354





No comments:

Post a Comment