Gradle

Maven allows the integration of the lightweight ArcPlay.ai SDK (~150 KB) by adding a few lines of code to the application’s build.gradle file. To use ArcPlay.ai simply add it to your build.gradle file:

  1. Add the JitPack and IS repositories to your build file. Add it in your root build.gradle at the top of your repositories:

maven { url 'https://jitpack.io' }
⁠maven { url 'https://android-sdk.is.com/' } ⁠		

After adding the above code to your repositories inside build.gradle it should look similar to this:

repositories {
    mavenCentral()
    maven { url 'https://jitpack.io' }
    ⁠maven { url 'https://android-sdk.is.com/' } ⁠
}

In case, you don't have mavenCentral() in your repositories, you should also add the following maven repos before jitpack:

repositories {
    maven { url 'http://repo1.maven.org/maven2' }
    maven { url 'https://jitpack.io' }
    ⁠maven { url 'https://android-sdk.is.com/' } ⁠
}

Note: If you are facing issues with fetching dependencies for com.github.ArcPlayAi:arcplay-sdk-android, you should add the above maven repo to your repositories.

  1. Add the dependency

That's it! Build the codebase and verify it is successful. Now you can move on to the Initialization step.

NOTE: If you are using Progaurd, kindly follow these rules.

Manual Integration

Alternatively, you can do the manual integration by following the below steps:

  1. Download the SDK:

    • Download the arcSDK.aar from the secure link shared by ArcPlay customer success team.

    • Place the arcSDK.aar file to the libs directory of your project or any other directory of your choice.

  2. Modify build.gradle and verify app:

    • Open build.gradle file from the app module.

    • Add the following line of code to the dependencies block

    • Click on Sync Now from the Android Studio bar and build the project to ensure that SDK is integrated correctly without errors.

ADDITIONAL NOTES:

  1. Progaurd rules

    1. Create a file name with proguard-arcplay.pro

    2. Add the following code in proguard-arcplay.pro file

    3. Include the following line of code in your build.gradle file before generating the release apk

  2. If you are using a build system other than Gradle, or if you encounter any issues during the integration process, kindly contact the ArcPlay.ai customer success team for further assistance.

Last updated