Autoryzowanie aplikacji na Androida na potrzeby pakietu SDK Portfela Google na Androida
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Interfejs API Portfela Google udostępnia pakiet SDK do Androida, który ułatwia integrację.
Portfel Google działa bezpośrednio w aplikacjach na Androida za pomocą natywnego kodu.
Aby korzystać z pakietu SDK Portfela Google na Androida, musisz podać nazwę swojego pakietu
Aplikacja na Androida oraz odcisk cyfrowy SHA-1 certyfikatu podpisywania aplikacji. Te dane logowania
służą do autoryzowania dostępu aplikacji do publikowania i uwierzytelniania żądań
wysyłane przez aplikację do interfejsu Google Wallet API.
1. Pobierz odcisk cyfrowy SHA-1 certyfikatu podpisywania
Aby pobrać odcisk cyfrowy SHA-1 certyfikatu podpisywania, wykonaj czynności opisane w
dokumentację Usług Google Play na temat pobierania jej przy użyciu jednego z tych elementów:
Odcisk cyfrowy SHA-1 certyfikatu podpisywania wygląda podobnie do tego:
DA:39:A3:EE:5E:6B:4B:0D:32:55:BF:EF:95:60:18:90:AF:D8:07:09
2. Autoryzuj aplikację w konsoli Portfela Google
Gdy już masz odcisk cyfrowy SHA-1, wykonaj te czynności, aby autoryzować urządzenie z Androidem
w konsoli Portfela Google.
- Otwórz stronę Google Pay & Konsola Portfela.
- W panelu nawigacyjnym po lewej stronie kliknij „Google Wallet API”. aby otworzyć konsolę Portfela Google.
- Kliknij „Dodatkowe funkcje”. .
- W sekcji „Uprawnienia aplikacji” kliknij „+ Dodaj aplikację”. Przycisk
- Wpisz nazwę pakietu aplikacji i odcisk cyfrowy SHA-1.
- Kliknij „Dodaj aplikację”.
Jeśli nazwa pakietu i aplikacja są widoczne w sekcji „Uprawnienia aplikacji” Aplikacja jest autoryzowana
do wysyłania żądań do interfejsu Google Wallet API przy użyciu pakietu SDK Portfela Google na Androida.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-08-29 UTC.
[null,null,["Ostatnia aktualizacja: 2025-08-29 UTC."],[[["\u003cp\u003eThe Google Wallet API offers an Android SDK for native app integration of Google Wallet features.\u003c/p\u003e\n"],["\u003cp\u003eYou need your app's package name and SHA-1 fingerprint for authorization and authentication.\u003c/p\u003e\n"],["\u003cp\u003eAuthorize your app in the Google Wallet console by providing your app's package name and SHA-1 fingerprint.\u003c/p\u003e\n"]]],["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"],null,["# Authorizing your Android app for the Google Wallet Android SDK\n\nThe Google Wallet API provides an Android SDK to make it easier for you to integrate\nGoogle Wallet capabilities directly in your Android apps with native code.\n\nTo use the Google Wallet Android SDK, you must provide the package name of your\nAndroid app, and the SHA-1 fingerprint of your app signing certificate. These credentials\nare used to authorize publishing access for your app, and authenticate requests\nsent by your app to the Google Wallet API.\n\n1. Get the SHA-1 fingerprint of your signing certificate\n--------------------------------------------------------\n\nTo get the SHA-1 fingerprint of your signing certificate, follow the directions in the\nGoogle Play services documentation for retrieving it using either of the following:\n\n- [keytool](/android/guides/client-auth#using_keytool_on_the_certificate)\n- [Gradle](/android/guides/client-auth#using_gradles_signing_report)\n\nThe SHA-1 fingerprint of your signing certificate looks similar to this: \n\n DA:39:A3:EE:5E:6B:4B:0D:32:55:BF:EF:95:60:18:90:AF:D8:07:09\n\n2. Authorize your app in the Google Wallet console\n--------------------------------------------------\n\nOnce you have your SHA-1 fingerprint, do the following to authorize your Android\napp in the Google Wallet console.\n\n1. Go to the [Google Pay \\& Wallet console](https://pay.google.com/business/console/).\n2. In the left nav, click 'Google Wallet API' to open the Google Wallet console.\n3. Click the 'Additional features' tab.\n4. In the 'App Permissions' box, click the '+ Add an app' button.\n5. Enter the package name of your app and your SHA-1 fingerprint.\n6. Click 'Add application'.\n\nIf your package name and app appear in the 'App Permissions' box, your app is authorized\nto send requests to the Google Wallet API using the Google Wallet Android SDK."]]