Stay organized with collections
Save and categorize content based on your preferences.
GetWalletCardsCallback
interface GetWalletCardsCallback
Handles response from the QuickAccessWalletService
for GetWalletCardsRequest
Summary
Public methods
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# GetWalletCardsCallback\n\nAdded in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nGetWalletCardsCallback\n======================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/service/quickaccesswallet/GetWalletCardsCallback \"View this page in Java\") \n\n```\ninterface GetWalletCardsCallback\n```\n\n|---------------------------------------------------------------|\n| [android.service.quickaccesswallet.GetWalletCardsCallback](#) |\n\nHandles response from the [QuickAccessWalletService](/reference/kotlin/android/service/quickaccesswallet/QuickAccessWalletService) for [GetWalletCardsRequest](/reference/kotlin/android/service/quickaccesswallet/GetWalletCardsRequest)\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onFailure](#onFailure(android.service.quickaccesswallet.GetWalletCardsError))`(`error:` `[GetWalletCardsError](/reference/kotlin/android/service/quickaccesswallet/GetWalletCardsError)`)` Notifies the Android System that an [QuickAccessWalletService.onWalletCardsRequested](/reference/kotlin/android/service/quickaccesswallet/QuickAccessWalletService#onWalletCardsRequested(android.service.quickaccesswallet.GetWalletCardsRequest,%20android.service.quickaccesswallet.GetWalletCardsCallback)) could not be handled by the service. |\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onSuccess](#onSuccess(android.service.quickaccesswallet.GetWalletCardsResponse))`(`response:` `[GetWalletCardsResponse](/reference/kotlin/android/service/quickaccesswallet/GetWalletCardsResponse)`)` Notifies the Android System that an [QuickAccessWalletService.onWalletCardsRequested](/reference/kotlin/android/service/quickaccesswallet/QuickAccessWalletService#onWalletCardsRequested(android.service.quickaccesswallet.GetWalletCardsRequest,%20android.service.quickaccesswallet.GetWalletCardsCallback)) was successfully handled by the service. |\n\nPublic methods\n--------------\n\n### onFailure\n\nAdded in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onFailure(error: GetWalletCardsError): Unit\n```\n\nNotifies the Android System that an [QuickAccessWalletService.onWalletCardsRequested](/reference/kotlin/android/service/quickaccesswallet/QuickAccessWalletService#onWalletCardsRequested(android.service.quickaccesswallet.GetWalletCardsRequest,%20android.service.quickaccesswallet.GetWalletCardsCallback)) could not be handled by the service.\n\n| Parameters ||\n|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `error` | [GetWalletCardsError](/reference/kotlin/android/service/quickaccesswallet/GetWalletCardsError): The error message. **Note:** this message should **not** contain PII (Personally Identifiable Information, such as username or email address). This value cannot be `null`. |\n\n| Exceptions ||\n|-----------------------------------|-------------------------------------------------------------------------------------------------------------------------|\n| `java.lang.IllegalStateException` | if this method or [onSuccess](#onSuccess(android.service.quickaccesswallet.GetWalletCardsResponse)) was already called. |\n\n### onSuccess\n\nAdded in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onSuccess(response: GetWalletCardsResponse): Unit\n```\n\nNotifies the Android System that an [QuickAccessWalletService.onWalletCardsRequested](/reference/kotlin/android/service/quickaccesswallet/QuickAccessWalletService#onWalletCardsRequested(android.service.quickaccesswallet.GetWalletCardsRequest,%20android.service.quickaccesswallet.GetWalletCardsCallback)) was successfully handled by the service.\n\n| Parameters ||\n|------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `response` | [GetWalletCardsResponse](/reference/kotlin/android/service/quickaccesswallet/GetWalletCardsResponse): The response contains the list of [walletCards](/reference/kotlin/android/service/quickaccesswallet/WalletCard) to be shown to the user as well as the index of the card that should initially be presented as the selected card. The list should not contain more than the maximum number of cards requested. This value cannot be `null`. |"]]