Skip to main content

Install the SDK

To leverage Qualtrics capabilities within your app, we recommend you install the Qualtrics SDK. This guide outlines how to install the SDK for each of the platforms we support.

Installing the Qualtrics Dependency​

You can use Gradle to install via our Maven repository, or manually install the SDK's AAR package.

Installing the SDK via Gradle​

info

The version number used in the sample code below is v2.7.0. However, please be sure to change it to the latest App Feedback SDK version.

  1. Open the project-level build.gradle file.
  2. Add a new Maven repository for the Qualtrics SDK package to your allprojects section:
build.gradle (Project level)
allprojects {
repositories {
google()
maven {
url "https://s3-us-west-2.amazonaws.com/si-mobile-sdks/android/"
}
}
}
warning

Do not add the Maven repository to the buildscript/repository section. The project will not build.

  1. Now navigate to the module-level build.gradle file.
  2. Add the following to your dependencies block:
build.gradle (Module level)
dependencies {
// ...
implementation 'com.qualtrics:digital:2.7.0'
}

Installing the SDK Manually​

The SDK can be integrated manually into an Android project rather than installed using Gradle.

  1. Download the latest SDK (.aar) file from the Android Mobile App SDK Releases page.
  2. See how to add .aar packages in Android Studio: https://developer.android.com/studio/projects/android-library#psd-add-aar-jar-dependency
  3. Open the module-level build.gradle file and add the following dependency:
build.gradle (Module level)
dependencies {
// ...
implementation project(':digital-2.7.0')
}
info

When installing the Qualtrics SDK manually, the project name must match the file name without the .aar extension. Also, the version of the SDK is in the file name. In this case, it is 2.7.0, so the exact version used in your app may differ from this example.

info

The line implementation project(':digital-2.7.0') (or the deprecated compile project(':digital-2.7.0') if using an older version of Gradle) should come after the other dependencies.

  1. You can now sync Gradle.

Adding the Qualtrics Activities​

Open the AndroidManifest.xml file from the src/main folder in the project root and add the following XML snippet after the existing activity:

AndroidManifest.xml
<activity android:name=
"com.qualtrics.digital.QualtricsSurveyActivity"/>
<activity android:name=
"com.qualtrics.digital.QualtricsPopOverActivity"
android:theme="@style/Qualtrics.Theme.Transparent"
android:configChanges="orientation|screenSize|keyboard|keyboardHidden" />

The AndroidManifest.xml file should appear like the example below:

AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.manualinstall">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Manualinstall">

<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/Theme.Manualinstall.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<!-- INSERTED QUALTRICS LINES -->
<activity android:name=
"com.qualtrics.digital.QualtricsSurveyActivity"/>
<activity android:name=
"com.qualtrics.digital.QualtricsPopOverActivity"
android:theme="@style/Qualtrics.Theme.Transparent"
android:configChanges="orientation|screenSize|keyboard|keyboardHidden" />
<!-- INSERTED QUALTRICS LINES -->

</application>

</manifest>
info

These activities are required to display the survey in a popup over the host app.