Android SDK Integration
You have two options two integrate our Android SDK. You can use either the .jar or the .aar files. Please, follow the instructions below.
Last updated
You have two options two integrate our Android SDK. You can use either the .jar or the .aar files. Please, follow the instructions below.
Last updated
Note: The SDK integration has to be done manually.
Download the .zip file and extract the .aar files.
Create a libs
folder at the root of your project and copy it here.
Now, on your Gradle configuration file (build.gradle
), add:
// Adstronomic SDK
compile(name: 'adstronomic-debug', ext: 'aar')
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'androidx.core:core-ktx:1.3.2'
Update your Gradle project.
π§ Tips: Having an error message saying βFailed to resolve :my_libraryβ? Click here
Download the .zip file and extract the .jar file.
Create a libs
folder at the root of your project and copy it here.
Now, on your Gradle configuration file (build.gradle
), add:
implementation files('libs/AdstronomicSDK.jar')
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'androidx.core:core-ktx:1.3.2'
Update your Gradle project.
Open your MainActivity.java
and add the following include code import com.adstronomic.sdk.Adstronomic;
.
Now, initialize Adstronomic in the onCreate
methods of your Activity
with this line Adstronomic.init(this, "CAMPAIGN ID");
and replace CAMPAIGN ID
with your ID available on your dashboard.
You're now ready to load and show Ads.
You can load all Ads after the setup with this method Adstronomic.loadAdsData();
.