Android SDK

Supported Platforms

Tech Stack Overview

SpecificationsDetails
Language VersionJava 11
IDEAndroid Studio 4
Desktop OSn/a
Build Dependenciesgradle-5.6.1
Certified OS VersionAPI 21 - API 34
Supported OS VersionAPI 21 - API 34
Android Native SDK size (.aar file)655 KB. Please note that our SDK can increase apk size by approximately 1 MB due to the usage of third party libraries. (Subject to change)
Compression ToolProguard
3rd Party Frameworks, Open Source Libraries, Library/Component Licenses- Android AppCompat: Native Android library
- Android Browser: Open links with CustomTabsIntent
- Android ConstraintLayout: Position and size widgets
- Android Material: BottomSheetDialogFragment for the UI display
- Android WorkManager: Retry background tasks
- Retrofit Converter Scalars: Used to make network calls
- Glide: Load logo images
- Play Services Ads Identifier: Retrieve Google ads identifier details
- ZXing Core: Render QR codes

Frequently Asked Questions (FAQ)

The following responses are supported solutions to frequently asked questions (FAQ) about the Android SDK. The OneTrust team continuously monitors these inquiries and will make additional FAQ available as they are identified.

  1. Is the SDK encrypted or obfuscated in any way?
    Yes, it is encrypted.

  2. Does the SDK use third-party libraries, external dependencies, or open source libraries?
    Yes, the SDK uses all three.

  3. Does the SDK work with SDK aggregators such as mParticle?
    No, it does not.

  4. What dependencies do I need when initializing Google Ad ID?
    The Google Play Services dependency must be downloaded in order to initialize Google Ad ID support for your Android devices.

  5. Does the Android SDK support Android Support Library?
    No, the Android SDK has several AndroidX dependencies. Android released API Level 28 in August 2018 which introduced AndroidX. This upgrade was declared a “major improvement” by Android and replaced their legacy Android Support Library. At this time, Android no longer supports Android Support Library.

  6. Does the Android SDK support Activity, FragementActivity, or AppCompatActivity when rendering UIs?
    The SDK supportsFragmentActivity or AppCompatActivity only.
    AppCompatActivity is derived from FragmentActivity and FragmentActivity is derived from Activity.
    To render the UI (bottom sheet fragment) on top of the application's UI, the Android SDK needs to work with FragmentManager. FragmentManager is part of FragmentActivity and AppCompatActivity, thus the SDK's UI needs FragmentActivity or AppCompatActivity.

  7. Does the SDK work when using minifyEnabled true for new releases?
    Many clients obfuscate their apps prior to release to optimize for size, security, and performance. Android supports this via the minifyEnabled setting for release buildTypes.
    We've had some customers raise issues previously with app crashes during their final phase of testing when minifyEnabled is set to true. Most commonly, this is due to app's org.json gradle dependency causing a collision with the OneTrust SDK's org.json dependency used for JSON parsing.
    To resolve this, please add the following to your app's proguard-rule.pro file inside of Gradle Scripts, then re-build the app.

    -keep class org.json.** { *; }
    
  8. What if the dependencies the SDK uses is an older/different version than the one my app uses and causes a conflict?
    In this instance, you can exclude these dependencies from the SDK and add it explicitly in your app. For example, the SDK uses OkHttp 2.8.1 which introduces vulnerabilities/conflicts with the app. You can exclude this dependency from OneTrust and specify your own.

    implementation ('com.squareup.retrofit2:retrofit:2.8.1') {
            // exclude Retrofit’s OkHttp dependency module and define your own module import
            exclude module: 'okhttp'
        }
    
     implementation 'com.squareup.okhttp3:okhttp:4.10.0'