StartApp Ads in Android Studio




StartApp Ads You also sign up This link You Sign up This link You get 50$ bonus for first 1000 Impressions. So Sign up this Link StartApp Sign up
How to add Startapp ads in Android studio Project
Step 1.      First Download Sdk in Startapp website and  and jar file added to libs folder.
Step 2.     Update Android Manifest .xml:- add these lines
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.karantips.intent.startapp">
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_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" />
    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">

        <activity android:name=".MainActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="com.startapp.android.publish.list3d.List3DActivity"
            android:theme="@android:style/Theme" />
        <activity android:name="com.startapp.android.publish.OverlayActivity"
            android:theme="@android:style/Theme.Translucent"
            android:configChanges="orientation|keyboardHidden|screenSize" />
        <activity android:name="com.startapp.android.publish.FullScreenActivity"
            android:theme="@android:style/Theme"
            android:configChanges="orientation|keyboardHidden|screenSize" />
    </application>
</manifest>
activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.karantips.intent.startapp.MainActivity">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!" />
       <com.startapp.android.publish.ads.banner.Banner
        android:id="@+id/startAppBanner"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"/>

</RelativeLayout>

NewYearsPromo-10usd468x60
MainActivity.Java

package com.karantips.intent.startapp;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import com.startapp.android.publish.StartAppAd;
import com.startapp.android.publish.StartAppSDK;

public class MainActivity extends AppCompatActivity {
    private StartAppAd startAppAd = new StartAppAd(this);
    @Override
   
protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        StartAppSDK.init(this, "Your app Id", true);
        StartAppAd.showSplash(this, savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    @Override    public void onBackPressed() {
        startAppAd.onBackPressed();
        super.onBackPressed();
    }
    @Override    public void onResume() {
        super.onResume();
        startAppAd.onResume();
    }
    @Override    public void onPause() {
        super.onPause();
        startAppAd.onPause();
    }
}
Note:- you can add only yellow color
 coding in your project no more change 
needed


 OUTPUT

This is your Banner and Interstitial ads when app start ads are show

NewYearsPromo-10usd468x60

This is your back button full screen ads



 You also Sign up Startapp Ads through This link You sign up
 Through this link you got 50$ for first 1000impression bonus
You also see the video of 
startapp tutorialthis link 





2 comments:

  1. i got source code for webview app simple with admob ads but i want new tab open when click on links or popup ads opened like in bowser we see when ads open in new tabs can u help me

    ReplyDelete
    Replies
    1. From where you got webview source code ? I need this .

      Delete