Mopub - StartApp
Mopub - StartApp
Mopub
StartApp Tech
Pembaharuan Terakhir: 27 Juli 2020 19:24
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
Asumsi:
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
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:
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
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:
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):
Interstitial: com.mopub.mobileads.StartappInterstitial
Banner: com.mopub.mobileads.StartappBanner
Native: com.mopub.nativeads.StartappNative
Rewarded: com.mopub.mobileads.StartappRewarded
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
}
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
bannerView.setLocalExtras(extras);
bannerView.loadAd();
}
moPubNative.setLocalExtras(extras);
moPubNative.makeRequest(requestParameters);
}
NETIVE AD SETTINGS
moPubNative.setLocalExtras(extras);
moPubNative.makeRequest(requestParameters);
}
Congratulation - that's it! You may now run your app and see StartApp ads in action.
Iya Tidak
Penggunaan Lanjutan
Adaptor AdMob
Mopub