Get started with Privacy Sandbox for Android

The Privacy Sandbox on Android Beta program provides stable APIs. We are planning several Beta releases throughout 2023. You can use the Beta program releases to build and test solutions for limited production testing on Android 13 mobile devices. We'll start supporting a small percentage of devices and increase the number over time. To participate, organizations can request access for a limited number of devices, plus register any apps which use the Privacy Sandbox APIs.

For the SDK Runtime, we're having a closed Beta for developers to test Runtime-enabled SDK distribution to select apps.

To use the Beta release, developers must to compile their solutions with an API level 33 SDK extension update.

Android SDK Extensions

Stable APIs in Beta releases are delivered using the new Android SDK Extensions release method. This release method enables the release of stable Android features between major releases. It features a new versioning mechanism that makes new APIs available to apps on multiple API levels using Google Play system updates. The Privacy Sandbox on Android SDK extension is called Ad Services Extensions. Learn more about Android SDK Extensions.

Get started

To get started, perform the following steps:

Step 1: Enroll and register for the Beta program

  • Enroll: Complete the enrollment process to use the ads-related APIs.
  • Register: You must register to participate in the Beta program. Registering lets you:
    • Enable your own devices for internal testing purposes.
    • Specify a limited number of published apps on the Google Play Store that can directly integrate privacy preserving APIs or integrate SDK solutions that use the APIs.
    • Test runtime-enabled SDK distribution using the Google Play Store. This step is not required if you only need to test the SDK Runtime on-device.

Step 2: Set up your development environment

Set up the Privacy Sandbox on Android SDK in Android Studio.

Step 3: Configure AdServices permissions

Declare API-specific permissions and configure SDK access to resources managed by the targeted API.

Step 4: Set up a device or emulator image

To perform end-to-end testing, you need to interact with a supported Android 13 device or use an emulator image for the proper SDK Extension.

Step 5: Configure devices to use Privacy Sandbox on Android

Configure settings to enable (or disable) Privacy Sandbox on Android to run on devices.

Troubleshoot known issues

To avoid known issues with PP API Integration on Android 12 and lower devices, developers integrating with ad services APIs for Android 12 and lower devices should do the following:

  1. Verify that the client app's manifest file contains the <uses-library> extservices tag. The relevant tag is as follows:
  android:required="false" />
  1. If you are using jetpack library then make sure that you’re using Version 1.1.0-beta05 or higher.

What developer resources are available?

The Privacy Sandbox on Android Beta program includes the following tools and resources.

SDK and emulator system images

Using Android Studio, you can download the latest Ad Services Extension and emulator system images through the SDK Manager. Learn more about how to set up your development environment and set up API access.

API Reference

The full API reference is available.

Support and feedback

As you test and develop with Privacy Sandbox on Android, review the release notes and use the issue tracker to report issues and give feedback.

Keep your development environment up to date

We strongly recommend keeping your development environment up to date with the latest release. This ensures that you have the most recent features and security patches, and that your environment is compatible with the latest versions of your dependencies. To stay notified of new releases, sign up for email updates.