Android SDK
Supported Platforms
Tech Stack Overview
Specifications | Details |
---|---|
Language Version | Java 11 |
IDE | Android Studio 4 |
Desktop OS | n/a |
Build Dependencies | gradle-5.6.1 |
Certified OS Version | API 21 - API 34 |
Supported OS Version | API 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 Tool | Proguard |
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.
-
Is the SDK encrypted or obfuscated in any way?
Yes, it is encrypted. -
Does the SDK use third-party libraries, external dependencies, or open source libraries?
Yes, the SDK uses all three. -
Does the SDK work with SDK aggregators such as mParticle?
No, it does not. -
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. -
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. -
Does the Android SDK support
Activity
,FragementActivity
, orAppCompatActivity
when rendering UIs?
The SDK supportsFragmentActivity
orAppCompatActivity
only.
AppCompatActivity
is derived fromFragmentActivity
andFragmentActivity
is derived fromActivity
.
To render the UI (bottom sheet fragment) on top of the application's UI, the Android SDK needs to work withFragmentManager
.FragmentManager
is part ofFragmentActivity
andAppCompatActivity
, thus the SDK's UI needsFragmentActivity
orAppCompatActivity
. -
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 whenminifyEnabled
is set totrue
. Most commonly, this is due to app'sorg.json
gradle dependency causing a collision with the OneTrust SDK'sorg.json
dependency used for JSON parsing.
To resolve this, please add the following to your app'sproguard-rule.pro
file inside of Gradle Scripts, then re-build the app.-keep class org.json.** { *; }
-
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'
Updated 5 months ago