Requirements

  • Android Studio 2022.1.1 or later
  • Android Gradle plugin version 7.4 or later
  • Gradle version 7.6 or later
  • Minimum Android SDK 24

Integration

To integrate the latest version of our SDK into your app, follow these steps:

  1. Add the following dependencies to your app’s build.gradle.kts file:

    1dependencies {
    2 implementation("ai.devrev.sdk:devrev-sdk:<version>")
    3}
  2. Add mavenCentral to your root build.gradle.kts file:

    1repositories {
    2 mavenCentral()
    3}

Set up the DevRev SDK

  1. Open the DevRev web app at https://app.devrev.ai and go to the Settings page.
  2. Under PLuG settings copy the value under Your unique App ID.
  3. After obtaining the credentials, you can configure the DevRev SDK in your app.

The SDK will be ready for use once you execute the following configuration method.

1DevRev.configure(context: Context, appId: String)

Ensure that the custom application is specified in the AndroidManifest.xml:

1<application
2 android:name=".MyApp">
3</application>

Use this property to check whether the DevRev SDK has been configured:

1DevRev.isConfigured

prefersDialogMode, if set to true, enables the SDK to open the screens in the app’s main task/activity

  1. To configure the SDK, you need to call the following method inside your Application class:

If you don’t have a custom Application class, create one as shown below.

1import ai.devrev.sdk.DevRev
2
3class FooApplication : Application() {
4
5 override fun onCreate() {
6 super.onCreate()
7 DevRev.configure(
8 context = this,
9 appId = "<APP_ID>"
10 )
11 }
12}
  1. In the onCreate method of your Application, configure the DevRev SDK with the required parameters using the credentials obtained earlier.
  2. Ensure that the custom application is specified in the AndroidManifest.xml, as shown below:
1<application
2 android:name=".FooApplication">
3</application>

Sample app

We provide a sample app demonstrating use cases with both XML-based UI and Jetpack Compose as part our public repository.

Before running the sample app, make sure to configure it with your DevRev credentials. To do this, update the ai.devrev.sdk.sample.DevRevApplication class with your credentials.

Built with