0% found this document useful (0 votes)
152 views7 pages

Mopub - StartApp

The document provides instructions for displaying StartApp ads in an app using MoPub as the mediation network. It explains how to integrate the StartApp SDK and MoPub mediation adapter, configure MoPub line items and settings, and optionally customize ad unit settings via code. Developers can then test the integration and begin showing StartApp ads in their app mediated through MoPub. The process involves 7 main steps: 1) Integrating the MoPub adapter, 2) Initializing StartApp SDK, 3) Configuring MoPub mediation settings, 4) Optional advanced configuration of ad units via code, 5) Setting up MoPub line items, 6) Loading ads, and 7) Testing the application.

Uploaded by

dafa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
152 views7 pages

Mopub - StartApp

The document provides instructions for displaying StartApp ads in an app using MoPub as the mediation network. It explains how to integrate the StartApp SDK and MoPub mediation adapter, configure MoPub line items and settings, and optionally customize ad unit settings via code. Developers can then test the integration and begin showing StartApp ads in their app mediated through MoPub. The process involves 7 main steps: 1) Integrating the MoPub adapter, 2) Initializing StartApp SDK, 3) Configuring MoPub mediation settings, 4) Optional advanced configuration of ad units via code, 5) Setting up MoPub line items, 6) Loading ads, and 7) Testing the application.

Uploaded by

dafa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

StartApp › SDK › Android

Mopub
StartApp Tech
Pembaharuan Terakhir: 27 Juli 2020 19:24

 Dokumen ini menjelaskan prosedur untuk menayangkan Iklan StartApp di aplikasi


Anda menggunakan MoPub sebagai jaringan mediasi

CATATAN:

Contoh kode dalam dokumen ini dapat disalin / ditempelkan ke kode sumber
Anda

Jangan ragu untuk melihat Proyek Sampel kami untuk membantu Anda
selama proses integrasi

Jika Anda memiliki pertanyaan, hubungi kami melalui  [email protected]

Asumsi:

MOPUB DISETEL SEBAGAI JARINGAN MEDIASI ANDA

The following manual assumes that you are already familiar with the MoPub Mediation
Network and have already integrated the MoPub Android SDK into your application
with at least one Ad Unit. 
Otherwise, please start by reading the following articles for a walk-through

explanation of what mediation is, how to use the MoPub Mediation UI, and instructions
on how to add MoPub mediation code into your app.

Mediation Overview

Instructions

YOU APPLICATION IS DEFINED IN YOUR STARTAPP ACCOUNT

At this point we assume that you have already added your application to your
StartApp account, in case you haven't, please follow the next steps:

1. Login into your StartApp Publisher's account

2. Add your application and get its App ID

3. Download the StartApp In-App SDK

For any questions or difficulties during this process, please contact us


via [email protected]

YOU HAVE INTEGRATED THE STARTAPP IN-APP SDK V.4.5.0 OR UP, AS


WELL AS YOUR DESIRED AD FORMATS.

Before you can integrate the mediation adapter, you need to make sure you have
integrated the StartApp SDK V.4.5.0 or up, as well as the Ad Formats you wish to
monetize. 

In case you haven't, please start from the steps described on the following SDK
integration guide

NOTES:

Note that this MoPub adapter is only compatible from StartApp SDK V.4.5.0

Step 1, Integrating the MoPub Mediation Adapter


You can add the MoPub adapter via Gradle jCenter dependency 

dependencies{
implementation 'com.startapp:inapp-sdk:4.+'
implementation 'com.startapp:mopub-mediation:3.+'
}

ANOTHER OPTION TO INTEGRATE THE ADAPTER IS THROUGH .JAVA


FILES:

StartApps MoPub Adapter is available on open source from GitHub.

Please use only one of the options mentioned above 

Step 2, SDK Initialization

There are two options for Initializing the StartApp SDK while using MoPub as
mediation, please select only one: 

1. Option 1: Preferred and more robust way is passing your startapp appId to the
MoPub custom event interface the optional parameter - 'startappAppId'
Example:

{startappAppId:'your_app_id_from_portal'}

2. Option 2: Initialize StartApp sdk from the code. For this case just add a few lines
which include your appId to the MoPub's SdkConfiguration object
Example:

final SdkConfiguration configuration = new SdkConfiguration.Builder(


.withAdditionalNetwork(StartappConfig.class.getName())
.withMediatedNetworkConfiguration(StartappConfig.class.getName(), C
.build();

Step 3, Configure MoPub Mediation Settings

Login into your MoPub account

Navigate to "Orders" tab and click "Create Order"

After Saving Create your Line Item and set it up to Type: "Network Line Item"

In this section, based on the Ad Units you wish StartApp to monetize add the relevant
information (you would need to create one Line Item per each Ad Unit):

Under the "CUSTOM EVENT CLASS" section:

 Interstitial: com.mopub.mobileads.StartappInterstitial

 Banner: com.mopub.mobileads.StartappBanner

 Medium Rectangle (300x250): com.mopub.mobileads.StartappMedium

 Native: com.mopub.nativeads.StartappNative

Rewarded: com.mopub.mobileads.StartappRewarded

 Under the "Custom event data" section:

 Interstitial: 

{startappAppId:'your_app_id_from_portal', adTag:'interstitialTagFromSe
}
 Banner &  Medium Rectangle (300x250): 

{startappAppId:'your_app_id_from_portal', adTag:'bannerTagFromServer',
}

Native: 

{startappAppId:'your_app_id_from_portal', adTag:'nativeTagFromServer',
}

Rewarded

{startappAppId:'your_app_id_from_portal', adTag:'rewardedTagFromServer
}

Step 4, MoPub Ad Unit Advanced Configuration via Code 

There are several parameters for each Ad Unit which can be configured from the
MoPub portal as described on section 3 or though code as described on this section.

All parameters mentioned below are optional and should be set based on your
monetization strategy and criteria.

NOTES:

Everything defined from the MoPub Portal will override the parallel
configuration made through the code.

All configurable parameters must be set in Json format and under the relevant
custom event class, note that you can choose to configure non to any of the
available parameters.

INTERSTITIAL SETTINGS
final Map<String, Object> extras = new StartappExtras.Builder() 
.setAdTag("interstitialTagFromAdRequest")
.setInterstitialMode(StartappExtras.Mode.OFFERWALL)
.muteVideo()
.setMinCPM(0.01)
.toMap();

interstitial.setLocalExtras(extras);
interstitial.load();
}

BANNER SETTINGS

final Map<String, Object> extras = new StartappExtras.Builder()


.setAdTag("bannerTagFromAdRequest")
.enable3DBanner()
.setMinCPM(0.01)
.toMap();

bannerView.setLocalExtras(extras);
bannerView.loadAd();
}

REWARDED VIDEO SETTINGS

final Map<String, Object> extras = new StartappExtras.Builder()


.setAdTag("nativeTagFromAdRequest")
.setMinCPM(0.01)
.setNativeImageSize(StartappExtras.Size.SIZE72X72)
.setNativeSecondaryImageSize(StartappExtras.Size.SIZE150X150)
.toMap();

moPubNative.setLocalExtras(extras);
moPubNative.makeRequest(requestParameters);
}
NETIVE AD SETTINGS 

final Map<String, Object> extras = new StartappExtras.Builder()


.setAdTag("nativeTagFromAdRequest")
.setMinCPM(0.01)
.setNativeImageSize(StartappExtras.Size.SIZE72X72)
.setNativeSecondaryImageSize(StartappExtras.Size.SIZE150X150)
.toMap();

moPubNative.setLocalExtras(extras);
moPubNative.makeRequest(requestParameters);
}

Step 6, Testing Your Application

Congratulation - that's it! You may now run your app and see StartApp ads in action.

Apakah artikel ini berguna?

 Iya  Tidak

0 dari 0 ditemukan ini berguna

  

ARTIKEL DI BAGIAN INI

Integrasi melalui jCenter

Integrasi Manual dengan File JAR

Penggunaan Lanjutan

Adaptor AdMob

Mopub

You might also like