为您的 Android 应用授权 Google Wallet Android SDK
Google Wallet API 提供的 Android SDK 可让您更轻松地进行集成
使用原生代码在 Android 应用中直接使用 Google 钱包功能。
要使用 Google Wallet Android SDK,您必须提供
Android 应用,以及应用签名证书的 SHA-1 指纹。这些凭据
用于授予应用的发布权限,以及对请求进行身份验证
发送到 Google Wallet API
1. 获取签名证书的 SHA-1 指纹
要获取签名证书的 SHA-1 指纹,请按照
有关如何使用以下任一方法检索 Google Play 服务的文档:
您的签名证书的 SHA-1 指纹类似于以下内容:
DA:39:A3:EE:5E:6B:4B:0D:32:55:BF:EF:95:60:18:90:AF:D8:07:09
2. 在 Google 钱包控制台中向您的应用授权
有了 SHA-1 指纹后,请执行以下操作来为您的 Android 设备授权
应用。
- 前往 Google Pay 和钱包控制台。
- 在左侧导航栏中,点击“Google Wallet API”以打开 Google 钱包控制台。
- 点击“其他功能”标签页。
- 在“应用权限”中请点击“+ 添加应用”按钮。
- 输入应用的软件包名称和 SHA-1 指纹。
- 点击“添加应用”。
如果您的软件包名称和应用出现在“应用权限”中则说明您的应用已获得授权
使用 Google Wallet Android SDK 向 Google Wallet API 发送请求。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-29。
[null,null,["最后更新时间 (UTC):2024-08-29。"],[[["The Google Wallet API offers an Android SDK for native app integration of Google Wallet features."],["You need to obtain your app's SHA-1 fingerprint and package name for authorization."],["Authorize your app via the Google Wallet console by providing the package name and SHA-1 fingerprint."]]],["The Google Wallet Android SDK requires app authorization using the app's package name and SHA-1 fingerprint. Retrieve the fingerprint via `keytool` or Gradle. Then, in the Google Pay & Wallet console, navigate to the 'Google Wallet API' section, and under 'App Permissions,' add your app details, including the package name and the obtained SHA-1 fingerprint. This process authorizes the app to use the Google Wallet API.\n"]]