• Stars
    star
    139
  • Rank 262,954 (Top 6 %)
  • Language
    Kotlin
  • License
    Other
  • Created almost 11 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Start.io Android SDK Demo

StartApp SDK Example

This project provides an example of the StartApp SDK integration for Android.

The example application contains the following ads:

  • Banner
  • Interstitial ad
  • Rewarded video
  • RecyclerView with Banner
  • RecyclerView with NativeAd

Add dependency

app/build.gradle

repositories {
    mavenCentral()
}

dependencies {
    // noinspection GradleDynamicVersion
    implementation 'com.startapp:inapp-sdk:4.10.+'
}
<!-- Add these permissions for better ad targeting -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>

<application>
    <!-- TODO replace YOUR_APP_ID with actual value -->
    <meta-data
        android:name="com.startapp.sdk.APPLICATION_ID"
        android:value="YOUR_APP_ID" />
</application>

Set up test ad

MainActivity.java

@Override
protected void onCreate(Bundle state) {
    super.onCreate(state);

    // NOTE always use test ads during development and testing
    StartAppSDK.setTestAdsEnabled(BuildConfig.DEBUG);

    setContentView(R.layout.main);
}

Add Banner into xml layout

<com.startapp.sdk.ads.banner.Banner
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />
public void someMethod() {
    // start your next activity
    startActivity(new Intent(this, OtherActivity.class));

    // and show interstitial ad
    StartAppAd.showAd(this);
}
public void showRewardedVideo() {
    final StartAppAd rewardedVideo = new StartAppAd(this);

    rewardedVideo.setVideoListener(new VideoListener() {
        @Override
        public void onVideoCompleted() {
            // Grant the reward to user
        }
    });

    rewardedVideo.loadAd(StartAppAd.AdMode.REWARDED_VIDEO, new AdEventListener() {
        @Override
        public void onReceiveAd(Ad ad) {
            rewardedVideo.showAd();
        }

        @Override
        public void onFailedToReceiveAd(Ad ad) {
            // Can't show rewarded video
        }
    });
}

For any question or assistance, please contact us at [email protected]

More Repositories

1

ios-sample

Sample App
Objective-C
15
star
2

unity-plugin-sample

Unity Plugin Sample App
C#
13
star
3

ios-swift-sample

Swift Sample App
Swift
8
star
4

StartAppSDK

Cocoapods repository for StartApp SDK
Objective-C
7
star
5

flutter-plugin

A Flutter plugin that uses native platform views to show ads from Start.io network.
Objective-C
6
star
6

android-admob-mediation

Start.io Mediation Adapter for AdMob (Android)
Java
6
star
7

unity-plugin

The StartApp in-app SDK universal unity wrapper
Objective-C
4
star
8

ios-admob-mediation-sample

The sample project for testing ios-admob-mediation adapter
Objective-C
2
star
9

StartApp_InApp_SDK_B4A_Example

StartApp InApp Android SDK for B4A Example Project
Java
2
star
10

ios-ironsource-mediation

Startio ironSource Mediation
Objective-C
2
star
11

android-mediation-common

Common code for all Android mediations
Java
2
star
12

android-ironsource-mediation

Start.io Mediation Adapter for IronSource (Android)
Java
2
star
13

ios-mopub-mediation

Start.io <-> MoPub iOS Mediation Adapter
Objective-C
2
star
14

ios-mopub-mediation-sample

The sample project for testing ios-mopub-mediation adapter
Objective-C
2
star
15

android-admob-mediation-sample

sample project which shows how to use all the features from android-admob-mediation. MavenCentral: implementation 'com.startapp:admob-mediation:2.+'
Java
2
star
16

android-applovin-mediation

Start.io Mediation Adapter for AppLovin (Android)
Java
1
star
17

Documentation

StartApp SDK Technical Documentation
1
star
18

ios-admob-mediation

Start.io <-> Admob iOS Mediation Adapter
Objective-C
1
star
19

startio-android-inapp-sdk

Java
1
star
20

android-mopub-mediation-sample

sample project which shows how to use all the features from android-mopub-mediation. jCenter: implementation 'com.startapp:mopub-mediation:3.+'
Java
1
star