使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
privacysandbox activity
TODO
最近更新时间 |
稳定版 |
候选版 |
Beta 版 |
Alpha 版 |
2025 年 3 月 26 日 |
- |
- |
- |
1.0.0-alpha02 |
声明依赖项
如需添加 privacysandbox-activity 的依赖项,您必须将 Google Maven 制品库添加到项目中。如需了解详情,请参阅 Google 的 Maven 代码库。
在应用或模块的 build.gradle
文件中添加所需工件的依赖项:
Groovy
dependencies {
// Use to implement privacysandbox activitys
// TODO: Confirm these dependencies
implementation "androidx.privacysandbox.activity:activity:1.0.0-alpha02"
// Use to implement privacysandbox activity complications
// TODO: Confirm these dependencies
implementation "androidx.privacysandbox.activity:activity-complications-data-source:1.0.0-alpha02"
// (Kotlin-specific extensions)
// TODO: Confirm these dependencies
implementation "androidx.privacysandbox.activity:activity-complications-data-source-ktx:1.0.0-alpha02"
// Use to implement a activity style and complication editor
// TODO: Confirm these dependencies
implementation "androidx.privacysandbox.activity:activity-editor:1.0.0-alpha02"
// Can use to render complications.
// TODO: Confirm these dependencies
// This library is optional and activitys may have custom implementation for rendering
// complications.
// TODO: Confirm these dependencies
implementation "androidx.privacysandbox.activity:activity-complications-rendering:1.0.0-alpha02"
}
Kotlin
dependencies {
// Use to implement privacysandbox activitys
// TODO: Confirm these dependencies
implementation("androidx.privacysandbox.activity:activity:1.0.0-alpha02")
// Use to implement privacysandbox activity complications
// TODO: Confirm these dependencies
implementation "androidx.privacysandbox.activity:activity-complications-data-source:1.0.0-alpha02"
// (Kotlin-specific extensions)
// TODO: Confirm these dependencies
implementation "androidx.privacysandbox.activity:activity-complications-data-source-ktx:1.0.0-alpha02"
// Use to implement a activity style and complication editor
// TODO: Confirm these dependencies
implementation("androidx.privacysandbox.activity:activity-editor:1.0.0-alpha02")
// Can use to render complications.
// TODO: Confirm these dependencies
// This library is optional and activitys may have custom implementation for rendering
// complications.
// TODO: Confirm these dependencies
implementation "androidx.privacysandbox.activity:activity-complications-rendering:1.0.0-alpha02"
}
如需详细了解依赖项,请参阅添加 build 依赖项。
反馈
您的反馈将帮助我们改进 Jetpack。如果您发现了新问题,或对此库有任何改进建议,请告诉我们。创建新问题前,请先查看此库中的现有问题。您可以点击星标按钮,为现有问题投票。
创建新问题
如需了解详情,请参阅问题跟踪器文档。
1.0 版
版本 1.0.0-alpha02
2025 年 3 月 26 日
发布了 androidx.privacysandbox.activity:activity-client:1.0.0-alpha02
、androidx.privacysandbox.activity:activity-core:1.0.0-alpha02
和 androidx.privacysandbox.activity:activity-provider:1.0.0-alpha02
。版本 1.0.0-alpha02 包含这些提交内容。
新功能
- 现在,您可以为不感知生命周期的 activity(即未实现
LifecycleOwner
接口的 activity)创建 SDK activity 启动器。这些启动器需要由调用方手动处理。
API 变更
- 添加了
LocalUnmanagedSdkActivityLauncher
和 createUnmanagedSdkActivityLauncher
,一个适用于无生命周期感知的 activity 的启动器类,以及用于创建此类启动器的方法。
- 将
LocalSdkActivityLauncher
重命名为 LocalManagedSdkActivityLauncher
,以突出显示此启动器与不了解生命周期的启动器之间的区别。
版本 1.0.0-alpha01
2023 年 11 月 15 日
发布了 androidx.privacysandbox.activity:activity-client:1.0.0-alpha01
、androidx.privacysandbox.activity:activity-core:1.0.0-alpha01
和 androidx.privacysandbox.activity:activity-provider:1.0.0-alpha01
。版本 1.0.0-alpha01 中包含这些提交内容。
新功能
- 推出了专用的 Privacy Sandbox activity 库。
- 它包含用于从 SDK 运行时启动 activity 的接口。这些接口以前在 Privacy Sandbox 界面库中定义。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# privacysandbox activity\n=======================\n\nAPI Reference \n[androidx.privacysandbox.activity](/reference/kotlin/androidx/privacysandbox/activity/package-summary) \nTODO \n\n| Latest Update | Stable Release | Release Candidate | Beta Release | Alpha Release |\n|----------------|----------------|-------------------|--------------|-----------------------------------------------------------------------------------|\n| March 26, 2025 | - | - | - | [1.0.0-alpha02](/jetpack/androidx/releases/privacysandbox-activity#1.0.0-alpha02) |\n\nDeclaring dependencies\n----------------------\n\nTo add a dependency on privacysandbox-activity, you must add the Google Maven repository to your\nproject. Read [Google's Maven repository](/studio/build/dependencies#google-maven)\nfor more information.\n\nAdd the dependencies for the artifacts you need in the `build.gradle` file for\nyour app or module: \n\n### Groovy\n\n```groovy\ndependencies {\n // Use to implement privacysandbox activitys\n // TODO: Confirm these dependencies\n implementation \"androidx.privacysandbox.activity:activity:1.0.0-alpha02\"\n\n // Use to implement privacysandbox activity complications\n // TODO: Confirm these dependencies\n implementation \"androidx.privacysandbox.activity:activity-complications-data-source:1.0.0-alpha02\"\n // (Kotlin-specific extensions)\n // TODO: Confirm these dependencies\n implementation \"androidx.privacysandbox.activity:activity-complications-data-source-ktx:1.0.0-alpha02\"\n\n // Use to implement a activity style and complication editor\n // TODO: Confirm these dependencies\n implementation \"androidx.privacysandbox.activity:activity-editor:1.0.0-alpha02\"\n\n // Can use to render complications.\n // TODO: Confirm these dependencies\n // This library is optional and activitys may have custom implementation for rendering\n // complications.\n // TODO: Confirm these dependencies\n implementation \"androidx.privacysandbox.activity:activity-complications-rendering:1.0.0-alpha02\"\n}\n```\n\n### Kotlin\n\n```kotlin\ndependencies {\n // Use to implement privacysandbox activitys\n // TODO: Confirm these dependencies\n implementation(\"androidx.privacysandbox.activity:activity:1.0.0-alpha02\")\n\n // Use to implement privacysandbox activity complications\n // TODO: Confirm these dependencies\n implementation \"androidx.privacysandbox.activity:activity-complications-data-source:1.0.0-alpha02\"\n // (Kotlin-specific extensions)\n // TODO: Confirm these dependencies\n implementation \"androidx.privacysandbox.activity:activity-complications-data-source-ktx:1.0.0-alpha02\"\n\n // Use to implement a activity style and complication editor\n // TODO: Confirm these dependencies\n implementation(\"androidx.privacysandbox.activity:activity-editor:1.0.0-alpha02\")\n\n // Can use to render complications.\n // TODO: Confirm these dependencies\n // This library is optional and activitys may have custom implementation for rendering\n // complications.\n // TODO: Confirm these dependencies\n implementation \"androidx.privacysandbox.activity:activity-complications-rendering:1.0.0-alpha02\"\n}\n```\n\nFor more information about dependencies, see [Add build dependencies](/studio/build/dependencies).\n\nFeedback\n--------\n\nYour feedback helps make Jetpack better. Let us know if you discover new issues or have\nideas for improving this library. Please take a look at the\n[existing issues](https://issuetracker.google.com/issues?q=componentid:1116743%20status:open)\nin this library before you create a new one. You can add your vote to an existing issue by\nclicking the star button.\n\n[Create a new issue](https://issuetracker.google.com/issues/new?component=1116743&template=1629474)\n\nSee the [Issue Tracker documentation](https://developers.google.com/issue-tracker)\nfor more information.\n\nVersion 1.0\n-----------\n\n### Version 1.0.0-alpha02\n\nMarch 26, 2025\n\n`androidx.privacysandbox.activity:activity-client:1.0.0-alpha02`, `androidx.privacysandbox.activity:activity-core:1.0.0-alpha02`, and `androidx.privacysandbox.activity:activity-provider:1.0.0-alpha02` are released. Version 1.0.0-alpha02 contains [these commits](https://android.googlesource.com/platform/frameworks/support/+log/312eb9f1ddece3a18317f18515a877e0e745cb2c..78132378b67c86698d1ade3dc368c9f15d738a71/privacysandbox/activity).\n\n**New Features**\n\n- SDK activity launchers can now be created for lifecycle-unaware activities, i.e. activities that don't implement the `LifecycleOwner` interface. These launchers need to be manually disposed of by the caller.\n\n**API Changes**\n\n- Added `LocalUnmanagedSdkActivityLauncher` and `createUnmanagedSdkActivityLauncher`, a launcher class for lifecycle-unaware activities and a method to create such launchers.\n- Renamed `LocalSdkActivityLauncher` to `LocalManagedSdkActivityLauncher` to highlight the distinction between this and lifecycle-unaware type of launchers.\n\n### Version 1.0.0-alpha01\n\nNovember 15, 2023\n\n`androidx.privacysandbox.activity:activity-client:1.0.0-alpha01`, `androidx.privacysandbox.activity:activity-core:1.0.0-alpha01`, and `androidx.privacysandbox.activity:activity-provider:1.0.0-alpha01` are released. [Version 1.0.0-alpha01 contains these commits.](https://android.googlesource.com/platform/frameworks/support/+log/312eb9f1ddece3a18317f18515a877e0e745cb2c/privacysandbox/activity)\n\n**New Features**\n\n- Introducing a dedicated Privacy Sandbox Activity library.\n- It contains interfaces for launching activities from the SDK Runtime. The interfaces were previously defined in the Privacy Sandbox UI library."]]