Add the Oracle Android Client SDK to the Project

Here are details on adding the Oracle Android Native Client SDK to your project.

To add the SDK using the Arctic Fox version of Android Studio or higher:
  1. Download the ODA Client SDK for Android and extract it to your local system.
  2. In Android Studio, select your project's app directory.
  3. Select the libs directory.
  4. Add com.oracle.bots.client.sdk.android.core-24.12.aar and com.oracle.bots.client.sdk.android.ui-24.12.aar to the libs folder.
  5. Add the following to the dependencies to the build.gradle (Module: app) file. These dependencies include:
    • The SDK library dependency
    • Core and UI dependencies - Used by the SDK library for the smooth functioning of library features.
         // SDK
             implementation files('libs/com.oracle.bots.client.sdk.android.ui-24.12.aar')
             implementation files('libs/com.oracle.bots.client.sdk.android.core-24.12.aar')
      
             // Core dependencies
             implementation 'androidx.room:room-runtime:2.6.1'
             implementation 'io.socket:socket.io-client:0.8.3'
             implementation 'androidx.core:core:1.15.0'
      
             //UI dependencies
             implementation 'androidx.appcompat:appcompat:1.7.0'
             implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
             implementation 'androidx.webkit:webkit:1.12.1'
             implementation 'com.google.android.material:material:1.12.0'
             implementation 'com.intuit.sdp:sdp-android:1.0.6'
             implementation 'com.squareup.picasso:picasso:2.8'
             implementation 'com.google.android.gms:play-services-location:21.3.0'
      
      
  6. Update the AndroidManifest.xml file with the permissions that will enable the host application to use the features supported by the Android Client SDK. You must declare these permissions in the manifest starting from Version 24.12 and higher of the Android Client SDK.
    Note

    You can omit permissions that don't apply to your application.
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
        <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
        <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
        <uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
        <uses-permission android:name="android.permission.READ_MEDIA_AUDIO"/>
        <uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>
        <uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
        <uses-permission android:name="android.permission.READ_MEDIA_VISUAL_USER_SELECTED"/>
        <uses-permission android:name="android.permission.RECORD_AUDIO" />
        <uses-permission android:name="android.permission.CAMERA" />
        <uses-feature
        android:name="android.hardware.camera"
        android:required="false" />
For prior versions for Android Studio:
  1. Select your project's app directory and then click File> New> New Module.
  2. Choose Import JAR/.AAR Package and then click Next.
  3. Navigate to, and select, com.oracle.bots.client.sdk.android.core-24.08.aar. Click Finish.
  4. Repeat these steps to import com.oracle.bots.client.sdk.android.ui-24.08.aar.
    Note

    You don't need to import this package if you're using the SDK in headless mode.
  5. Ensure that these libraries are listed at the top of project's settings.gradle file. For example:
     include ':app', ':com.oracle.bots.client.sdk.android.core-24.12', ':com.oracle.bots.client.sdk.android.ui-24.12'
        rootProject.name = 'ODASDKSample'
  6. Add the following to the dependencies in the build.gradle (Module: app) file. These dependencies include:
    • The SDK library dependency
    • Core and UI dependencies which are used by the SDK library for the smooth functioning of library features.
       // SDK
             implementation files('libs/com.oracle.bots.client.sdk.android.ui-24.08.aar')
             implementation files('libs/com.oracle.bots.client.sdk.android.core-24.08.aar')
      
             // Core dependencies
             implementation 'androidx.room:room-runtime:2.5.1'
             implementation 'io.socket:socket.io-client:0.8.3'
             implementation 'androidx.core:core:1.8.0'
      
             //UI dependencies
             implementation 'androidx.appcompat:appcompat:1.6.1'
             implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
             implementation 'androidx.webkit:webkit:1.10.0'
             implementation 'com.google.android.material:material:1.8.0'
             implementation 'com.intuit.sdp:sdp-android:1.0.6'
             implementation 'com.squareup.picasso:picasso:2.8'
             implementation 'com.google.android.gms:play-services-location:21.2.0'