使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
凭据注册表
为了解决上述问题,我们将添加一种新的注册表机制,让应用能够以可保护隐私的方式提供数字凭据。概括来讲,提供商应用将通过 Credential Manager 预注册其所有候选数字凭据;当 Credential Manager 收到特定数字凭据的应用请求时,会在沙盒中运行凭据匹配和用户选择器界面。
最近更新时间 |
稳定版 |
候选版 |
Beta 版 |
Alpha 版 |
2024 年 10 月 16 日 |
- |
- |
- |
1.0.0-alpha01 |
声明依赖项
要添加对 Credentials Registry 的依赖项,您必须将 Google Maven 代码库添加到
项目。如需了解详情,请参阅 Google 的 Maven 代码库。
在应用或模块的 build.gradle
文件中添加所需工件的依赖项:
Groovy
dependencies {
// Use to implement credentials registrys
implementation "androidx.credentials.registry:registry-digitalcredentials-mdoc:1.0.0-alpha01"
implementation "androidx.credentials.registry:registry-digitalcredentials-preview:1.0.0-alpha01"
implementation "androidx.credentials.registry:registry-provider:1.0.0-alpha01"
implementation "androidx.credentials.registry:registry-provider-play-services:1.0.0-alpha01"
}
Kotlin
dependencies {
// Use to implement credentials registrys
implementation("androidx.credentials.registry:registry-digitalcredentials-mdoc:1.0.0-alpha01")
implementation("androidx.credentials.registry:registry-digitalcredentials-preview:1.0.0-alpha01")
implementation("androidx.credentials.registry:registry-provider:1.0.0-alpha01")
implementation("androidx.credentials.registry:registry-provider-play-services:1.0.0-alpha01")
}
如需详细了解依赖项,请参阅添加 build 依赖项。
反馈
您的反馈将帮助我们改进 Jetpack。如果您发现了新问题,或对此库有任何改进建议,请告诉我们。创建新问题前,请先查看此库中的现有问题。您可以点击星标按钮,为现有问题投票。
创建新问题
如需了解详情,请参阅问题跟踪器文档。
凭据注册表 1.0
版本 1.0.0-alpha01
2024 年 10 月 16 日
发布了 androidx.credentials.registry:registry-*:1.0.0-alpha01
。版本 1.0.0-alpha01 包含这些提交内容。
新功能
- 新增了 Credential Manager 提供程序注册表支持:允许提供程序向 Credential Manager 预注册凭据元数据,以便 Credential Manager 在收到应用请求时将其显示给用户。
- 添加了 ISO/IEC mdoc 凭据 API,用于注册 mdoc 凭据
- 还添加了一个基于预览版协议的注册表,以展示端到端功能
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# credentials registry\n====================\n\nAPI Reference \n[androidx.credentials.registry](/reference/kotlin/androidx/credentials/registry/package-summary) \nTo solve for these, we are adding a new registry mechanism that allows an app to provide digital credentials in a privacy-preserving way. At a high level, the provider app will be pre-registering all their candidate digital credentials with the Credential Manager; When Credential Manager receives an app request for a specific digital credential, it will run the credential matching and user selector UI in a sandbox. \n\n| Latest Update | Stable Release | Release Candidate | Beta Release | Alpha Release |\n|------------------|----------------|-------------------|--------------|--------------------------------------------------------------------------------|\n| October 16, 2024 | - | - | - | [1.0.0-alpha01](/jetpack/androidx/releases/credentials-registry#1.0.0-alpha01) |\n\nDeclaring dependencies\n----------------------\n\nTo add a dependency on credentials registry, 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 credentials registrys\n\n implementation \"androidx.credentials.registry:registry-digitalcredentials-mdoc:1.0.0-alpha01\"\n implementation \"androidx.credentials.registry:registry-digitalcredentials-preview:1.0.0-alpha01\"\n implementation \"androidx.credentials.registry:registry-provider:1.0.0-alpha01\"\n implementation \"androidx.credentials.registry:registry-provider-play-services:1.0.0-alpha01\"\n\n}\n```\n\n### Kotlin\n\n```kotlin\ndependencies {\n // Use to implement credentials registrys\n\n implementation(\"androidx.credentials.registry:registry-digitalcredentials-mdoc:1.0.0-alpha01\")\n implementation(\"androidx.credentials.registry:registry-digitalcredentials-preview:1.0.0-alpha01\")\n implementation(\"androidx.credentials.registry:registry-provider:1.0.0-alpha01\")\n implementation(\"androidx.credentials.registry:registry-provider-play-services:1.0.0-alpha01\")\n\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:1301097%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=1301097&template=1773864)\n\nSee the [Issue Tracker documentation](https://developers.google.com/issue-tracker)\nfor more information.\n\nCredentials Registry 1.0\n------------------------\n\n### Version 1.0.0-alpha01\n\nOctober 16, 2024\n\n`androidx.credentials.registry:registry-*:1.0.0-alpha01` is released. Version 1.0.0-alpha01 contains [these commits](https://android.googlesource.com/platform/frameworks/support/+log/b8a68b0896897fa158508d73a31998a26161d9a7/credentials/registry).\n\n**New Features**\n\n- New Credential Manager provider registry support: allow providers to pre-register credential metadata with Credential Manager which can be later surfaced to the user by the Credential Manager upon an incoming app request.\n- Added ISO/IEC mdoc credential APIs for registering mdoc credentials\n- Also added a preview protocol based registry to demonstrate the end-to-end capability"]]