Stay organized with collections Save and categorize content based on your preferences.
The Privacy Sandbox on Android offers Developer Preview and Beta programs. We'll introduce new APIs and features in the Developer Preview over time and promote stabilized APIs to the Beta program. Feedback is encouraged.
If you're new to the Privacy Sandbox on Android, start with the Program Overview. To get started with building Privacy Sandbox into your project, set up your development environment and get the Privacy Sandbox on Android on your test device or emulator.
Current releases Android VanillaIceCream PreviewProtected Audience API
Attribution Reporting API
This release of the Privacy Sandbox on Android Beta includes updates to the Privacy Sandbox APIs on public Android 14 devices. The SDK and device images are available to download using Android Studio's SDK manager as Android API 34, Extension Level 10, and is functionally similar to Developer Preview 9, with a few key modifications.
Protected Audience API
Attribution Reporting API
SDK Runtime
Release date: December 19, 2023
Known limitations
adb shell device_config put adservices fledge_auction_server_overall_timeout_ms 60000;
Protected Audience API
Attribution Reporting API
On-Device Personalization
Release date: August 15, 2023
Known limitations
getAdSelectionData
and persistAdSelectionResult
when consent is revoked crashes the process.getAdSelectionData
and persistAdSelectionResult
.Protected Audience API
reportEvent
.Attribution Reporting API
SDK Runtime
ContentProvider
(such as com.android.providers.settings.SettingsProvider
), where obtained data lacks identifiers and can't be used to build a fingerprint of the user. These checks also apply to accessing ContentProvider
using ContentResolver
.android.intent.action.AIRPLANE_MODE
).The March 2023 release of the Privacy Sandbox on Android Beta includes updates to the Privacy Sandbox APIs on public Android 13 devices. This release includes Ad Services Extensions 5 APIs and is functionally similar to Developer Preview 6, with a few key modifications.
Known limitations
General
registerSource
and registerTrigger
would fail with exceptions. If you experienced these issues during development, a fix has rolled out and these issues should resolve over time.shouldRecordObservation
field for details.To enable testing in FLEDGE on Android, register for the Beta program and use that same Google Account to sign in to your test devices. Otherwise, attempts to call APIs cause an IllegalStateException
with a "Service is not available" message. FLEDGE should be reinstated in the next Beta release.
In the meantime, testing using Developer Previews can continue and is encouraged, and FLEDGE can be manually enabled on devices with the following caveats:
You can enable FLEDGE with the following adb commands. However, this causes the background fetch process to crash, which negatively impacts system health metrics. This is not a permanent solution as these values may be reset by the platform.
adb shell device_config set_sync_disabled_for_tests persistent
adb shell setprop debug.adservices.fledge_select_ads_kill_switch false
adb shell setprop debug.adservices.fledge_custom_audience_service_kill_switch false
adb shell device_config put adservices fledge_background_fetch_enabled true
Release date: May 23, 2023
Known limitations
WIN
-typed frequency cap filters can be added to Protected Audience ads, the WIN
type is not yet supported, and filters of this type are ignored.Protected Audience API
Attribution Reporting API
event_trigger_data
object is ignored.scheduled_report_time
to event reports for parity with the Privacy Sandbox for Web.SDK Runtime
Release date: January 26, 2023
FLEDGE on Android API
custom_audience_signals
has been renamed in the following JavaScript methods:
generateBid()
has been renamed custom_audience_bidding_signals
.scoreAd()
has been renamed custom_audience_scoring_signals
.reportWin()
has been renamed custom_audience_reporting_signals
.selectAds
override that takes AdSelectionFromOutcomeConfig
to compares selectAds
results. This enables ad tech SDKs that leverage this API to run waterfall mediation. More details are outlined in the developer guide.selectAds()
API now supports caching for bidding and scoring logic JavaScript fetched during the ad selection process.
Cache-Control
headers returned by the servers during the JavaScript fetch call. Use no-cache
or no-store
to prevent JavaScript responses from getting cached, and max-age to control the cache duration.max-age
is set to two days by default.Attribution Reporting on Android API
registerSource()
and registerTrigger()
. The API consumer can now use an HTTP redirect as the server response.Release date: January 9, 2023
Privacy Sandbox on Android Beta 1 represents the first availability of Privacy Sandbox APIs on public devices, and adds improvements to the areas listed next.
General
Topics API
Attribution Reporting API
SDK Runtime
The following limitations are expected to be fixed in the next major Android platform release:
RecyclerView
currently does not work properly. You may experience jank if the element is resized. User touch scroll events are not passed to the runtime properly.WebView
rendering is not available in the SDK Runtime process.getAdId
and getAppSetId
APIs is not yet activated.Release date: October 31, 2022
Privacy Sandbox on Android Developer Preview 6 adds improvements to the following areas:
General
In preparation for production rollout, Developer Preview 6 introduced a flag to disable Privacy-Preserving API access by default. For testing purposes, enable Privacy-Preserving API access in the Developer Preview by running the following command:
adb shell device_config put adservices global_kill_switch false
The AdIdManager
and AppSetIdManager
APIs require Google Play services version 22.36.16 or higher.
Topics API
getTopics
registers as an observer.GetTopicsRequest
class.FLEDGE on Android API
Url
in parameters with Uri
. This applies to all FLEDGE APIs and custom JavaScript for bidding and scoring logic.owner
field from Custom Audience API inputs.Attribution Reporting API
General
AdServices
configurations that control access for embedded SDKs.AdIdManager
and AppSetIdManager
are not currently operational. They will be enabled in a later release.SDK Runtime
sendData()
will be deprecated in a future version.loadSdk()
now returns an IBinder object to facilitate 2-way communication between the runtime-enabled SDK and apps defined in AIDL.Attribution Reporting API
This release introduces additional features in the Attribution Reporting API, including:
Attribution-Reporting-Register-Aggregatable-Source
is now a part of Attribution-Reporting-Register-Source
Attribution-Reporting-Register-Event-Trigger, Attribution-Reporting-Register-Aggregatable-Trigger-Data
and Attribution-Reporting-Register-Aggregatable-Values
have been consolidated into a single header named Attribution-Reporting-Register-Event-Trigger
Attribution-Reporting-Redirects
is still a separate headerFLEDGE on Android API
This release includes several new features and improvements, as well as breaking changes:
runAdSelection()
has been renamed to selectAds()
.AdSelectionConfig.Builder.setAdSelectionSignals()
with AdSelectionSignals
, which represents a JSON object.String
to represent an ad tech buyer/seller with the AdTechIdentifier
object.TestCustomAudienceManager
and TestAdSelectionManager
classes for overriding remote JavaScript-fetching.selectAds
and reportImpression
now have execution time limits, after which the call will be terminated.selectAds
and reportImpression
now have a limit to memory consumed during JavaScript execution. The APIs will throw an error if the memory consumption exceeds configured limits.selectAds
and reportImpression
now validate the AdSelectionConfig
object to ensure that fields are syntactically valid and that the URLs are under the eTLD+1 used in the seller field.AdServices
now validates custom audiences at time of creation. Some of this validation includes ensuring expiration time is valid and applies a limit to how many custom audiences an app can create and the total size of the ads provided in the joinCustomAudience
call. The validation also enforces that the URIs provided for signals and bidding logic retrieval and background fetching are all under the buyer's domain.Known Issues:
When joining a custom audience, the platform currently doesn't perform background updates immediately, if any of the metadata or AdData
values are empty or null
. The custom audience won't be eligible for ad selections until it's been updated one day later. A future release will make incomplete custom audiences immediately eligible for background fetch updates. The current default memory limit for JavaScript execution is too low and might cause normal workloads to crash the JavascriptEngine on devices. Your JavaScript execution may terminate unexpectedly with the error message "Fatal javascript OOM in CALL_AND_RETRY_LAST"
.
You can manually resolve this by configuring the proper memory threshold with the following command:
adb shell "device_config put adservices fledge_js_isolate_enforce_max_heap_size 10485760"
Custom audience ads that don't match the required JSON structure are updated during background fetch.
Topics API
Tools Updates
Android Studio Canary has support for building SDK APKs with a new module type. The SDK Runtime Developer Guide has been updated, and the Privacy Sandbox sample apps on GitHub reflect this update.
Developer Preview 4Release date: July 14, 2022
Privacy Sandbox on Android Developer Preview 4 adds improvements to the following areas:
SDK Runtime
sendData()
.Attribution Reporting API
This release introduces changes to improve clarity around using the Attribution Reporting API, such as:
FLEDGE on Android API
This release includes new features to aid in testing and debuggability, as well as a internal improvements:
Topics API
This release includes several significant changes to the Topics API, most importantly:
getTopics()
API has been changed to the new Topic
object type which encapsulates integer IDs that correspond to Topics in the Taxonomy, and information about the classifier and Taxonomy versions. You should update any existing apps using this API.Known issues
The initial release of these device images (revision 6) doesn't load on Android Emulator version 31.2.10. Updated device images that address the problem have been made available as of July 27, 2022.
Note: If you installed the revision 6 device images before July 27, 2022, you must uninstall the old image before you can install the updated image.Release date: June 9, 2022
Privacy Sandbox on Android Developer Preview 3 adds functionality for the Attribution Reporting API and FLEDGE on Android.
Attribution Reporting API
The Attribution Reporting API improves user privacy by removing reliance on cross-party user identifiers, and supports key use cases for attribution and conversion measurement across apps.
This release includes developer resources to help you test the following Attribution Reporting API features:
A sample app and reference ad tech server are provided to aid with testing
Known issues:
FLEDGE on Android
FLEDGE on Android introduces a new way to show ads based on custom audiences defined by app developers and the interactions within their app. This solution stores information and associated ads locally, and provides a framework to orchestrate ad selection workflows.
This release includes developer resources to help you test the following FLEDGE on Android features:
Known issues:
Release date: May 17, 2022
Developer Preview 2 includes early previews of the MeasurementManager
attribution reporting APIs.
registerSource()
and registerTrigger()
to register app ad events and receive event-level reporting data for app-to-app attribution. Our current implementation uses last-touch attribution. Reports are scheduled to be sent out as defined by the reporting windows. Refer to the MeasurementManager
API reference for more information.The actual report upload happens at the end of fixed intervals of time, rather than at the exact scheduled time. The reporting upload interval is 4 hours by default, but can be overridden with the following adb command:
adb shell device_config put adservices measurement_main_reporting_job_period_ms <duration in milliseconds>
A sample app and reference ad tech server for testing APIs will be published in a future release.
Other MeasurementManager
attribution reporting API features like aggregate reporting, post-install attribution, and redirects will be available in a later release.
Release date: April 28, 2022
Developer Preview 1 includes early previews of the Topics API and SDK Runtime. Functionality for FLEDGE on Android and Attribution Reporting APIs will become available in a future release.
getTopics()
API currently returns test values based on offline classification for a limited set of apps. On-device classifications are not yet implemented.<sdk-library>
element in your SDK app's manifest file. Install RE SDKs on a supported test device or emulator as you would normally install an app during development.WebView
-based banner ads or content in the SDK Runtime.TiramisuPrivacySandbox
. For example, you may see the warning message: "Call requires API level 33". You can temporarily address this by using the @SuppressLint("NewApi")
annotation.Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-03-11 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-11 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3