Set up your development environment

Follow the instructions on this page to set up the Privacy Sandbox on Android SDK in Android Studio.

Set up the Privacy Sandbox SDK

Within Android Studio, install the SDK as follows:

  1. Install the latest Canary build or Stable build of Android Studio.
  2. In Android Studio, go to Tools > SDK Manager.
  3. In the SDK Platforms tab, select Android TiramisuPrivacySandbox Preview.
  4. In the SDK Tools tab, select Android SDK Build-Tools 33.
  5. Click OK to install the SDK.

Declare the correct API levels

To use the Privacy Preserving APIs that are part of the Privacy Sandbox on Android, declare your app's compile API level and target API level as follows, based on your version of the Android Gradle plugin (AGP):

  • AGP 7.0.0 or higher:

    compileSdkPreview "TiramisuPrivacySandbox"
    targetSdkPreview "TiramisuPrivacySandbox"
  • AGP 4.2.0 or lower:

    compileSdkVersion "android-TiramisuPrivacySandbox"
    targetSdkVersion "android-TiramisuPrivacySandbox"

Get the Privacy Sandbox on Android on a supported device

After you complete the preceding setup steps, you can then test Privacy Sandbox on Android. To do so, download a device or emulator image.

More information

To learn more about the Privacy Sandbox on Android, read the introduction and program overview pages. You can also sign up to receive regular updates in your inbox.