AdMob - Android

Based on the AdMob demo project: https://github.com/googleads/googleads-mobile-android-examples you can check Nefta custom adapter integration example here: https://github.com/Nefta-io/NeftaAMAdapter-Android.

Include the SDK

Gradle

Add the following repository to the settings.gradle:

dependencyResolutionManagement {
    repositories {
        ...
        maven { url 'https://maven.nefta.app/android-sdk' }
    }
}

Then add the libraries to your app build.gradle:

dependencies {
    ...
    implementation 'com.nefta:nefta-sdk-am:4.3.0'
}

Manually

Or you can integrate manually: https://docs.nefta.io/update/docs/manual-android-integration-2#/


Permissions

Make sure that you're having all the required permissions declared:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Code integration

Initialize the SDK as soon as possible (for accurate session tracking) with:

NeftaAdapter.InitWithAppId(this, "5713110509813760", (InitConfiguration config) -> {
   Log.i("NeftaPluginAM", "Nefta initialized, nuid: " + config._nuid);
});