privacysandbox ui
Latest Update | Stable Release | Release Candidate | Beta Release | Alpha Release |
---|---|---|---|---|
December 11, 2024 | - | - | - | 1.0.0-alpha12 |
Declaring dependencies
To add a dependency on privacysandbox-ui, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.
Add the dependencies for the artifacts you need in the build.gradle
file for
your app or module:
Groovy
dependencies { // Use to implement privacysandbox ui implementation "androidx.privacysandbox.ui:ui:1.0.0-alpha12" // Use to implement privacysandbox ui-core implementation "androidx.privacysandbox.ui:ui-core:1.0.0-alpha12" // Use to implement privacysandbox ui-core implementation "androidx.privacysandbox.ui:ui-provider:1.0.0-alpha12" }
Kotlin
dependencies { // Use to implement privacysandbox ui implementation("androidx.privacysandbox.ui:ui:1.0.0-alpha12") // Use to implement privacysandbox ui-core implementation("androidx.privacysandbox.ui:ui-core:1.0.0-alpha12") // Use to implement privacysandbox ui-provider implementation("androidx.privacysandbox.ui:ui-provider:1.0.0-alpha12") }
For more information about dependencies, see Add build dependencies.
Feedback
Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.
See the Issue Tracker documentation for more information.
Version 1.0
Version 1.0.0-alpha12
December 11, 2024
androidx.privacysandbox.ui:ui-client:1.0.0-alpha12
, androidx.privacysandbox.ui:ui-core:1.0.0-alpha12
, and androidx.privacysandbox.ui:ui-provider:1.0.0-alpha12
are released. Version 1.0.0-alpha12 contains these commits.
New Features
- Replaced
StateChangedListener
withSandboxedSdkViewEventListener
. This event listener can be used to listen to UI displayed, session closed and session error events.
API Changes
- Adds
SandboxedSdkViewEventListener
for listening to UI events insideSandboxedSdkView
. This version also removesStateChangedListener
. (Id71ea)
Bug Fixes
- Removed clipping bounds logic from
SandboxedSdkView
. This will cause UX issues ifSandboxedSdkView
is placed in a scrollable container andorderProviderUiAboveClientUi(false)
has not been called (until the underlying framework bug is fixed). (Id420d) - Fixed
RemoteException
that could occur if the remote process dies while usingDelegatingSandboxedUiAdapter
.
Version 1.0.0-alpha11
November 13, 2024
androidx.privacysandbox.ui:ui-client:1.0.0-alpha11
, androidx.privacysandbox.ui:ui-core:1.0.0-alpha11
, and androidx.privacysandbox.ui:ui-provider:1.0.0-alpha11
are released. Version 1.0.0-alpha11 contains these commits.
New Features
- Introduced an experimental API,
DelegatingSandboxedUiAdapter
, which extendsSandboxedUiAdapter
and can be used to delegate between differentSandboxedUiAdapters
. When this adapter is set on a client container such asSandboxedSdkView
, the delegating adapter can change the delegate adapter usingupdateDelegate
. This will close the existing session and create a newSandboxedUiAdapter.Session
for the new delegate. This allows for seamless transitions between delegates. (I5f1c5, I9e3e7) - Added better
SandboxedSdkView
support for padding. (Ic414f)
Bug Fixes
- Fixed
NullPointerException
that could occur on a global layout event.
Version 1.0.0-alpha10
September 18, 2024
androidx.privacysandbox.ui:ui-client:1.0.0-alpha10
, androidx.privacysandbox.ui:ui-core:1.0.0-alpha10
, and androidx.privacysandbox.ui:ui-provider:1.0.0-alpha10
are released. Version 1.0.0-alpha10 contains these commits.
New Features
- Updated session opening logic to only open a session inside a
SandboxedSdkView
if the window containing theSandboxedSdkView
is visible. - Updated
SessionObserver
logic to sendonUiContainerChanged
when the visibility of the window containing theSandboxedSdkView
changes.
Bug Fixes
- Invoke
onUiContainerChanged
when the window visibility changes (I541cf) - Removed manual outlining of access to new platform APIs since this happens automatically via API modeling when using R8 with AGP 7.3 or later (e.g. R8 version 3.3) and for all builds when using AGP 8.1 or later (e.g. D8 version 8.1). Clients who are not using AGP are advised to update to D8 version 8.1 or later. See this article for more details. (If6b4c, b/345472586)
Version 1.0.0-alpha09
June 26, 2024
androidx.privacysandbox.ui:ui-client:1.0.0-alpha09
, androidx.privacysandbox.ui:ui-core:1.0.0-alpha09
, and androidx.privacysandbox.ui:ui-provider:1.0.0-alpha09
are released. Version 1.0.0-alpha09 contains these commits.
New Features
- Introduced
AbstractSandboxedUiAdapter
andAbstractSandboxedUiAdapter.AbstractSession
abstract classes that can be used by UI providers to avoid implementing the entireSandboxedUiAdapter
orSession
interfaces. It is recommended for UI providers to use these abstract classes. - Added
registerObserverFactory
logic that allows aSessionObserverFactory
to be attached to aSandboxedUiAdapter
. When aSessionObserverFactory
is attached to an adapter, aSessionObserver
will be created for each new UI session created for that adapter. The createdSessionObserver
will receive anonSessionOpened
callback when the UI session is opened. When the UI presentation of theSession
’s view changes,SessionObserver.onUiContainerChanged
will be called.onUiContainerChanged
is throttled and will be called at most every 200ms. - Added
SandboxedSdkViewUiInfo
which can be created from theBundle
sent inSessionObserver.onUiContainerChanged
. This object represents the UI state of theSandboxedSdkView
that is hosting the UI session. It contains height and width information, aRect
representing the geometry of the view that is visible on screen, and an opacity hint that represents the opacity of the view.
API Changes
- Add opacity hint to
SandboxedSdkViewUiInfo
. (I093ac) - Add
SessionObserver.onUiContainerChanged
andSandboxedSdkViewUiInfo
. (Ie98bc) - Add
SessionObserver
interface and registration logic. (I047dc) - Add
AbstractSandboxedUiAdapter
andAbstractSession
. (I3617a)
Known Issues
- When the UI provider is in the same process as the client application,
SessionObserver.onUiContainerChanged
is not sent when the container scrolls.
Version 1.0.0-alpha08
May 14, 2024
androidx.privacysandbox.ui:ui-client:1.0.0-alpha08
, androidx.privacysandbox.ui:ui-core:1.0.0-alpha08
, and androidx.privacysandbox.ui:ui-provider:1.0.0-alpha08
are released. Version 1.0.0-alpha08 contains these commits.
New Features
- Added support for using
SandboxedSdkView
inside aPoolingContainer
such as aRecyclerView
. When aSandboxedSdkView
has a parent that is aPoolingContainer
, the lifecycle of its UI sessions will be aligned with that of thePoolingContainer
to ensure that the session can persist through window detachment.
API Changes
- Deprecated Privacy Sandbox Activity APIs. These APIs can now be found in the dedicated Activity library
androidx.privacysandbox.activity
instead. (I68beb)
Bug Fixes
- Fixed rendering bug when displaying remote content inside pooling containers. (I804df)
- Fixed a bug that caused rendering issues for
ViewGroups
in backwards compatibility mode. (I8de92) - When one of
SandboxedSdkView
's parents is aPoolingContainer
, close the UI Session when thePoolingContainer
indicates resources can be released, instead of on window detachment. (I2046b)
External Contribution
GestureDetectorCompat
is now deprecated asGestureDetector
is available from theminSdk
. (Icc4cd)
Version 1.0.0-alpha07
October 18, 2023
androidx.privacysandbox.ui:ui-client:1.0.0-alpha07
, androidx.privacysandbox.ui:ui-core:1.0.0-alpha07
, and androidx.privacysandbox.ui:ui-provider:1.0.0-alpha07
are released. Version 1.0.0-alpha07 contains these commits.
New Features
- Added backwards compatibility support for the library. On API 33 and below, the provider’s view will be rendered inside the app process, in a different classloader. (If0b7a)
- Added logic that allows the resizing of host and provider containers to be committed in the same frame to avoid visible UI jank. (Ic2cd9)
API Changes
- MinSdk for the library bumped to API 21. (I474b8)
Version 1.0.0-alpha06
September 20, 2023
androidx.privacysandbox.ui:ui-client:1.0.0-alpha06
, androidx.privacysandbox.ui:ui-core:1.0.0-alpha06
, and androidx.privacysandbox.ui:ui-provider:1.0.0-alpha06
are released. Version 1.0.0-alpha06 contains these commits.
New Features
- Added logic to clip
SandboxedSdkView
to the “bounding parent” View that it may scroll within. This ensures that the contents of theSandboxedSdkView
do not occlude other views or any UI components outside of the root content view. (I9ea94)
API Changes
- Rename
SandboxedSdkView.setZOrderOnTopAndEnableUserInteraction
toorderProviderUiAboveClientUi
(Iecb7e)
Bug Fixes
- Send the correct Z-order value to the host. (Ib0ddf)
- Only transfer touch focus for vertical scrolls/flings. (I0528c)
Version 1.0.0-alpha05
August 9, 2023
androidx.privacysandbox.ui:ui-client:1.0.0-alpha05
, androidx.privacysandbox.ui:ui-core:1.0.0-alpha05
, and androidx.privacysandbox.ui:ui-provider:1.0.0-alpha05
are released. Version 1.0.0-alpha05 contains these commits.
New Features
- Added logic to transfer touch focus to host on scroll and fling gestures originating from
SandboxedSdkView
. This allows the client’s scrollable container hosting provider UI to respond correctly to scrolls and flings.
API Changes
- Added
windowInputToken
parameter toSandboxedUiAdapter
(Ief578)
Bug Fixes
- Set session state to Active after the first draw (I36f3f)
- Fix layout issue with
SandboxedSdkView
. (I09cb8) - Added logic to transfer touch focus to host. (I33b54)
- Add
windowInputToken
parameter toSandboxedUiAdapter
. This is necessary to ensure that theSurfaceControlViewHost
's token is correctly associated with the host of the embedded hierarchy. (Ief578) - Run
notifyResized
inside the main thread. (I62440) - Fix crash in the
Session.close()
flow. (I5392e)
Version 1.0.0-alpha04
June 21, 2023
androidx.privacysandbox.ui:ui-client:1.0.0-alpha04
, androidx.privacysandbox.ui:ui-core:1.0.0-alpha04
, and androidx.privacysandbox.ui:ui-provider:1.0.0-alpha04
are released. Version 1.0.0-alpha04 contains these commits.
New Features
- Introduce the
SdkActivityLauncher
. An interface for allowing runtime enabled SDKs to launch activities. (I5b3dc)
Bug Fixes
- Fix
notifyZOrderChanged
race condition. Ensures that the UI provider is notified for all Z-order changes. The UI provider will not be explicitly notified if the Z-order of theSandboxedSdkView
is changed before openSession is invoked.
Version 1.0.0-alpha03
May 24, 2023
androidx.privacysandbox.ui:ui-client:1.0.0-alpha03
, androidx.privacysandbox.ui:ui-core:1.0.0-alpha03
, and androidx.privacysandbox.ui:ui-provider:1.0.0-alpha03
are released. Version 1.0.0-alpha03 contains these commits.
New Features
StateChangedListener
informs the application of changes in the UI session
API Changes
- Added
StateChangedListener
to replace theErrorConsumer
(Icd5d3)
Bug Fixes
- Fixed
notifyZOrderChanged
race condition so the UI provider is notified for all Z-order changes
Version 1.0.0-alpha02
April 19, 2023
androidx.privacysandbox.ui:ui-client:1.0.0-alpha02
, androidx.privacysandbox.ui:ui-core:1.0.0-alpha02
, and androidx.privacysandbox.ui:ui-provider:1.0.0-alpha02
are released. Version 1.0.0-alpha02 contains these commits.
Bug Fixes
- Disabled flaking testChangingSandboxedSdkViewLayoutChangesChildLayout test
Version 1.0.0-alpha01
March 8, 2023
androidx.privacysandbox.ui:ui-client:1.0.0-alpha01
, androidx.privacysandbox.ui:ui-core:1.0.0-alpha01
, and androidx.privacysandbox.ui:ui-provider:1.0.0-alpha01
are released. Version 1.0.0-alpha01 contains these commits.
New Features
- These are new jetpack libraries that applications and Runtime Enabled SDKs (Privacy Sandbox) can use to let the application (client) host any UI provided by the SDK (provider).