How to Integrate Privacy Pillar Privacy Manager with your Android App?

Introduction

To make it simple for you to publish your cookie banner and obtain your visitor consent, we've introduced a user-friendly Privacy Pillar Privacy Manager app, which you can integrate with your mobile app.

Steps to Integrate:-  

Prerequisites:

Before integrating Privacy Pillar Privacy Manager, you must complete the following tasks.

Follow the Below Steps to Integrate

    1. Create a new project by selecting Kotlin or any other language and adding the below permission in the manifest file before or after the application tag. Refer to the below screenshot.
      <uses-permission android:name="android.permission.INTERNET" />

    2. The new project’s compiled SDK version should be 31 and above since play stores accept the same version
      - Add the version (compileSdkVersion 32) to the project gradle file.
    3. The new project’s target SDK version should be 31 and add the version (targetSdkVersion 31) to the project gradle file.
    4. The new project’s target SDK version should be 31 and add the version (minSdkVersion 24) to the project gradle file.
    5. See the below screenshot for your reference.

Local AAR file integration 

    1. Download the SDK file from the below path and paste it into the app-> libs folder 
      Adzapier_CMP_SDK
    2. Refer to the below screenshot
    3. Then inside app->build.gradle file, add the below dependency in the dependencies block, and then sync the gradle.
      implementation files("libs/CCPA_SDK-prod-debug.aar")
    4. Refer to the below screenshot
    5. To integrate the AAR file from the libs folder you need to add flatDir configuration in settings.gradle file.
    6. Refer to code snippet and sync the gradle.
      dependencyResolutionManagement {    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)    repositories {        google()        mavenCentral()        maven { url 'https://jitpack.io' }        flatDir {            dirs 'libs'        }    }}
    7. Below is the source code used to call the SDK screen that can be called from activity or wherever context instance is available.
      var resultLauncher = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { result ->   if (result.resultCode == Activity.RESULT_OK) {     // below data variable receive data sent from SDK       val data: Intent? = result.data    }}fun navigateToCMPSDK() {   var intent = Intent(this, HomeActivity::class.java)    // Organisation ID value    intent.putExtra("orgID", "802e1a56-4778-42de-bf2c-6871760ac892")    // property ID value   intent.putExtra("propID", "20a41e16-95ae-467d-a147-68751433cd98")    // if you want callback when CMP sdk back into the main screen                          // then use below code     resultLauncher.launch(intent)    // if you don’t want callback then    //startActivity(intent)}