For Android developers, who manage their own digital passes, Google Wallet offers a fast and secure entry point, especially when quick access is needed. Google Wallet will be quickly accessible from the device lock screen on Pixel devices and from the pulldown shade. Your users will be able to quickly access their passes when they need them - all in one place.
Integrating with Google Wallet became even easier and more flexible. We’ve summarized the news of what you can expect as an Android developer.
New Android SDK
Using the Android SDK is straightforward. First, you create a payload with information about the pass. You can either build it directly in your Android app, or retrieve it from your backend stack. Then, you call the savePasses or savePassesJwt method in the "PayClient" to add the pass to Google Wallet.
{ "id": "ISSUER_ID.OBJECT_ID", "classId": "CLASS_ID", "genericType": "GENERIC_TYPE_UNSPECIFIED", "cardTitle": { "defaultValue": { "language": "en", "value": "Your Program Name" } }, "header": { "defaultValue": { "language": "en", "value": "Alex McJacobs" } } } |
| private val addToGoogleWalletRequestCode = 1000 private val walletClient: PayClient = Pay.getClient(application) private val jwtString = "" // Fetch a previously created JWT with pass data walletClient.savePassesJwt(jwtString, this, addToGoogleWalletRequestCode) |
Once your app calls savePassesJwt, the process guides your users through the flow of adding a pass to Google Wallet, and allows them to preview the pass before confirming the save operation.
. We customized our developer guides for each pass type to make all the information easily accessible for your specific needs. You will also find plenty of code samples demonstrating how to check for availability of the Google Wallet API on the Android device, how to handle errors, and how to add the “Add to Google Wallet” button to your app.
Don’t forget to play with our interactive
We’re really excited to build a great digital wallet experience with you, and can’t wait to see how you use the Google Wallet API to enrich your customer experience. Take a look at our hands-on workshop " and and register your Android application to use the API.
SOCIAL SHARE CARD GENERATOR