Setup and Installation
Overview
Section titled “Overview”The Secure Privacy Consent Management SDK provides developers with an easy way to manage user consent within their applications. By integrating this SDK, you can ensure compliance with privacy regulations while offering users control over their data preferences.
Getting Started
Section titled “Getting Started”Obtain Your Application ID
Section titled “Obtain Your Application ID”To use the Secure Privacy Consent Management SDK, you need an Application ID. Sign up for a free trial at Secure Privacy to get your Application ID.
Installation
Section titled “Installation”To begin using the Secure Privacy SDK for Android, include the SDK dependency in your project along with some additional dependencies.
- Add the SDK dependency to your
build.gradle:
dependencies { implementation("ai.secureprivacy.sdk:mobile-consent:0.4.0")
// Standard libraries implementation(libs.androidx.core.ktx) implementation(libs.androidx.appcompat) implementation(libs.material)
// Required libraries for the SDK implementation(libs.retrofit) implementation(libs.gson) implementation(libs.converterGson) implementation(libs.converterScalars) implementation(libs.cryptoKtx)}- Ensure the following library versions are included in your
libsconfiguration:
retrofit = "2.11.0"gson = "2.11.0"converterGson = "2.11.0"converterScalars = "2.11.0"cryptoKtx = "1.1.0-alpha06"Initialization
Section titled “Initialization”To initialize the SDK, call the following method with your applicationId in your main activity or app initialization code. You may also include secondaryApplicationId, which is an optional parameter used to display a secondary consent banner in your app:
val spConsentEngine = SPConsentEngine.initialise( activity, SPAuthKey( applicationId = "YOUR_APPLICATION_ID", secondaryApplicationId = "YOUR_SECONDARY_APPLICATION_ID" ))This will set up the SDK and enable access to its features and returns an instance of SPConsentEngine.
Android TV Support
Section titled “Android TV Support”The Secure Privacy Mobile Consent SDK is fully compatible with Android TV.
Key Notes for TV Integration
Section titled “Key Notes for TV Integration”- The core SDK behavior remains the same as Android mobile.
- SDK UI automatically adapts for D-pad (remote) navigation.
- Consent banners and preference center are optimized for large screens.
- No extra configuration, flags, or dependencies are required.
The SDK automatically detects Android TV and adjusts UI/behaviour as needed.
Explore the Example App
Section titled “Explore the Example App”Check out Secure Privacy Android SDK – Example App on GitHub!