Android
These instructions give an overview of integrating the MobileFuse SDK with your Android app.
Mediation Platforms
If you want to integrate using a mediation platform such as AppLovin MAX or AdMob Mediation, please go here:
Current Version
Android SDK: <<sdkVersionAndroid>>
<<sdkVersionAndroid>>
Released December 4th 2024
Integration Steps Overview
Step 1. Add the MobileFuse SDK to your app
The MobileFuse SDK is distributed on Maven Central and we recommend including the SDK into your project using Gradle.
Gradle setup
Ensure that mavenCentral is included in your settings.gradle file:
repositories {
// [... other project repos]
mavenCentral()
}
Update your app module’s dependencies to include the MobileFuse SDK:
dependencies {
// [... other project dependencies]
implementation 'com.mobilefuse.sdk:mobilefuse-sdk-core:<<sdkVersionAndroid>>'
}
Step 2. Configure Data Privacy
Follow our guide to set up Data Privacy
- Ensure that you configure ATTS in your app
- Provide any relevant consent strings (US Privacy, TCF, and/or GPP)
Step 3. Initialize MobileFuse
After setting up MobileFusePrivacyPreferences and MobileFuseTargetingData (if using), you should initialize the SDK with the following methods:
// When you want to initialize the SDK
MobileFuse.init( new SdkInitListener()
{
@Override
public void onInitSuccess()
{
// Init succeeded, do what you want to do here!
}
@Override
public void onInitError()
{
// Init failed. Handle error case
}
} );
Note that if you try to load an ad before calling the initialization method, the SDK will initialize itself before requesting an ad, which may cause the first ad requested to take longer to become available.
Step 3. Create Ad Units
The following guides provide steps to get started with each of our supported ad formats:
Testing your integration
Read our guide on testing your integration:
Updated about 1 month ago