Adjump
VersionHome Page
  • Adjump SDK Documentation
  • ANDROID
    • 📲SDK Setup
    • ⚡SDK Initialization
    • 🛠️ProGuard Rules
  • REACT NATIVE
    • 📲SDK Setup
    • ⚡SDK Initialization
    • 🛠️ProGuard Rules
  • Flutter
    • 📲SDK Setup
    • ⚡SDK Initialization
    • 🛠️ProGuard Rules
  • Payout
    • 🔌S2S Postback Setup
Powered by GitBook
On this page
  • Add Native Module Files
  • Register the Module
  • Initialize AdJump SDK:
  • Open the Adjump offerwall
  1. REACT NATIVE

SDK Initialization

PreviousSDK SetupNextProGuard Rules

Last updated 2 months ago

Add Native Module Files

Download the following files and add them to your Android app's module directory:

Register the Module

In your MainApplication file, locate the getPackages() method and register the Adjump SDK module by adding the following line:

@Override
protected List<ReactPackage> getPackages() {
    // Get the list of packages
    List<ReactPackage> packages = new PackageList(this).getPackages();
    
    // Add the Adjump SDK package to the list
    packages.add(new AdjumpSdkPackage());
    
    return packages;
}
override fun getPackages(): List<ReactPackage> {
    // Get the list of packages
    val packages = PackageList(this).packages
    
    // Add the Adjump SDK package to the list
    packages.add(AdjumpSdkPackage())
    
    return packages
}

Initialize AdJump SDK:

adjump.initialize(accountId, appId, userId, 
  (message) => {
    console.log(message); // You can optionally log the success message
  }, 
  (error) => {
    console.error(error);
  }
);

The parameters to this call are as follows:

Parameter
Description

accountId

Your Adjump account id.

appId

Your Adjump application id.

userId

The registered User Id associated with your application.

Open the Adjump offerwall

To initiate the OfferWall, simply invoke the launchOfferWallmethod.

adjump.launchOfferWall((successMessage) => {
  Alert.alert("Success", successMessage);
}, (errorMessage) => {
  Alert.alert("Error", errorMessage);
});

⚡
871B
AdjumpSdkPackage.java
3KB
AdjumpSdkModule.java