MAX - Android
Based on the MAX demo project: https://github.com/AppLovin/AppLovin-MAX-SDK-Android you can check Nefta custom adapter integration example here: https://github.com/Nefta-io/NeftaMAXAdapter-Android:

Include the SDK
You can download the latest Nefta custom adapter module from: https://github.com/Nefta-io/NeftaMAXAdapter-Android/releases.
Extract the NeftaMaxAdapter-release-x.y.z.aar and include it in your Android project in /libs folder, so that it will look something like this:

Then include this module as a dependency in your project build.gradle:
implementation 'androidx.lifecycle:lifecycle-process:2.4.1'
implementation files('libs/NeftaMaxAdapter-release-1.0.4.aar') // or newer

Permissions
In order for the SDK to work it requires permissions for the network which you need to add to your project AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
All done
With this technical part completed, make sure that you have the Nefta mediation enabled in your MAX Configuration.
You can also verify the correct SDK behaviour through logs.
With all this done, you will start seeing Nefta test ads in your app.
Custom code integration
IronSource SDK initialized custom adapters only when it needs to show an Ad. In case you would like to initialize Nefta SDK sooner, you have to do this manually with the following code:
NeftaPlugin.Init(getApplicationContext(), "yourApplicationId");
Events
Game events can be then recorded as follows:
NeftaPlugin.Events.AddProgressionEvent(
NeftaEvents.ProgressionStatus.Completed,
NeftaEvents.ProgressionType.Achievement,
NeftaEvents.ProgressionSource.Boss,
"SuperBoss",
1L,
"anything else");
Mediation Event collection
To maximize earning through Nefta you can opt in for sending additional mediation events like this:
// For Banners in your onAdRevenuePaid override of MaxAdRevenueListener for (Banner) MaxAd:
@Override
public void onAdRevenuePaid(final MaxAd ad) {
Log.i(TAG, "onAdRevenuePaid "+ ad.getAdUnitId() + ": " + ad.getRevenue());
NeftaMediationAdapter.OnExternalAdShown(ad);
}
// For Interstitials in your onAdDisplayed override of MaxAdListener for (Interstitial) MaxAd:
@Override
public void onAdDisplayed(@NonNull MaxAd ad) {
Log.i(TAG, "onAdDisplayed"+ ad.getAdUnitId());
NeftaMediationAdapter.OnExternalAdShown(ad);
}
// For rewarded in your onAdDispalyed override of MaxAdListener for (Rewarded) MaxAd:
@Override
public void onAdDisplayed(@NonNull MaxAd ad) {
Log.i(TAG, "onAdDisplayed "+ ad.getAdUnitId());
NeftaMediationAdapter.OnExternalAdShown(ad);
}
This way we server more suitable inventory for your supply.
Updated 3 days ago