⚡SDK Initialization
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;
}
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 launchOfferWall
method.
adjump.launchOfferWall((successMessage) => {
Alert.alert("Success", successMessage);
}, (errorMessage) => {
Alert.alert("Error", errorMessage);
});
Last updated