You can obtain the latest version from the Hyperbid Tools SDK Download Page.
- Select the SDK version
- Select mediation platform
- Select the network
- Click to generate access code
Copy the generated Gradle reference code into the
build.gradle
file of your project
Merge the following content into the
AndroidManifest.xml
of your project:
<application>
<!-- Compatibility configuration for Android 9+ -->
<uses-library
android:name="org.apache.http.legacy"
android:required="false"/>
<!-- Admob integration configuration (replace value with actual application ID) -->
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
</application>
- If shrinkResource is enabled in your app, you need to download the SDK zip package and place the keep.xml file inside it under res/raw path.
- If you’re using a third-party resource optimization framework (such as AndResProguard), you need to add the contents of the whitelists.txt file from the SDK zip package to the whitelist of the resource optimization framework.
- Further reading: Official Android Resource Optimization Guide
MCSDK.init(context, "your_app_id", "your_app_key", new MCInitListener() {
@Override
public void onMediationInitFinished(MCInitResult mcInitResult) {
Log.i(TAG, "onMediationInitFinished: error msg: " + mcInitResult.getErrorMsg());
Log.i(TAG, "onMediationInitFinished: init success mediation: " + mcInitResult.getSuccessMediationIdList());
Log.e(TAG, "onMediationInitFinished: init failed mediation: " + mcInitResult.getFailedMediationIdMap());
String mediationConfig = MCSDK.getMediationConfig();
Log.i(TAG, "onMediationInitFinished: mediationConfig: " + mediationConfig);
}
});
MCAdConst.MediationId | Value | Description |
---|---|---|
MEDIATION_ID_TOPON | 1 | TopOn |
MEDIATION_ID_MAX | 2 | Max |
MEDIATION_ID_ADMOB | 4 | AdMob |
It is recommended to configure a Preset Strategy to improve the ad loading efficiency during the first launch of the app.