Install the Android SDK
Follow these steps to add the required dependencies to your Android project.
Add the Maven Repository
Configure your top-level settings.gradle.kts file as shown:
1 // settings.gradle.kts
2 dependencyResolutionManagement {
3 repositories {
4 google ( )
5 mavenCentral ( )
6 maven { url = uri ( "https://jitpack.io" ) }
7 maven { url = uri ( "https://opensource.salesforce.com/AgentforceMobileSDK-Android/agentforce-sdk-repository" ) }
8 maven { url = uri ( "https://s3.amazonaws.com/inapp.salesforce.com/public/android" ) }
9 maven { url = uri ( "https://s3.amazonaws.com/salesforce-async-messaging-experimental/public/android" ) }
10 }
11 }
Add SDK Dependencies
In your app-level build.gradle.kts file, add the dependencies for the integration path you choose. The agentforcesdk artifact is for the Full UI experience, while agentforce-service is for the Headless approach.
1 // build.gradle.kts
2 plugins {
3 id ( "com.android.application" )
4 id ( "kotlin-android" )
5 id ( "kotlin-kapt" )
6 id ( "kotlinx-serialization" )
7 id ( "org.jetbrains.kotlin.plugin.compose" )
8 }
9
10 // app/build.gradle.kts
11 android {
12 compileOptions {
13 isCoreLibraryDesugaringEnabled = true
14 }
15 }
16
17 dependencies {
18 // Agentforce SDK Dependencies
19 api ( "com.salesforce.android.agentforcesdk:agentforce-sdk:14.0.0" )
20
21 coreLibraryDesugaring ( "com.android.tools:desugar_jdk_libs:2.1.5" )
22 implementation ( "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3" )
23 }
After adding the dependencies, sync your project with the Gradle files.
Next Steps