Android SDK Integration

Android Studio

The SDK supports Ice Cream Sandwich 4.0.3 (API Level 15) or higher and is available through the Gradle build system in Android Studio.

1. Your gradle build file needs to have the following dependency and url of our Maven repo:

        buildscript {

            repositories {
                google()

          }
            dependencies {
                classpath 'com.android.tools.build:gradle:version'

            }
        }

        allprojects {
            repositories {
                google()
                maven { url "https://bitbucket.org/adscend/androidsdk/raw/master/" }
            }
        }

        task clean(type: Delete) {
            delete rootProject.buildDir
        }
      

For newer Android Studio projects created in Android Studio Bumblebee | 2021.1.1 or newer, the JitPack repository needs to be added into the root level file settings.gradle instead of build.gradle:

        dependencyResolutionManagement {
            repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
            repositories {
              // ...
                maven { url "https://bitbucket.org/adscend/androidsdk/raw/master/" }
            }
        }
      

2. You can also download a sample Android Studio project showing how to integrate our SDK.

The AndroidManifest.xml file should contain the following permissions

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

Open-source Gradle Dependencies

Our Android SDK is built open several open-source libraries. In case you are already using any of these in your project and face any issues you can remove the duplicates from your project gradle build file as they'll be automatically imported by our SDK.

dependencies {
        implementation 'com.adscendmedia.sdk:adscendmedia:2.4.0'

        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation 'com.android.support:appcompat-v7:25.3.1'
        implementation 'com.android.support:design:25.3.1'
        implementation 'com.android.support:support-v4:25.3.1'
        implementation 'com.google.android.gms:play-services-ads:10.3.1'
        implementation 'com.google.code.gson:gson:2.8.0'
        implementation 'com.squareup.picasso:picasso:2.5.2'
}

Proguard

If you are using Proguard to shrink, optimize and obfuscate your code add the following lines to your project configuration file (proguard-rules.pro in Android Studio):

-dontwarn java.nio.file.*
-dontwarn com.squareup.okhttp.**
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement

-keepattributes Signature
-keepattributes Exceptions

-keep class sun.misc.Unsafe { *; }
-keep class com.google.gson.stream.** { *; }
-keep class com.adscendmedia.sdk.rest.model.** { *; }
-keep class com.adscendmedia.sdk.rest.response.** { *; }
Need Help with Intergration?

If you have any questions about integrating our Offer Wall into your project, don't hesitate to reach out to us at

dev@adscendmedia.com