WalletObjectsClient
Stay organized with collections
Save and categorize content based on your preferences.
Entry point for Wallet objects functionality.
Inherited Method Summary
From class com.google.android.gms.common.api.GoogleApi
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[null,null,["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eWalletObjectsClient\u003c/code\u003e provides functionality for integrating with Google Pay to manage wallet objects like loyalty cards, gift cards, and offers.\u003c/p\u003e\n"],["\u003cp\u003eIt utilizes the \u003ccode\u003ecreateWalletObjects\u003c/code\u003e method to initiate a user interface where users can save these objects to their Google Pay account.\u003c/p\u003e\n"],["\u003cp\u003eThis process follows the \u003ccode\u003eAutoResolveHelper\u003c/code\u003e protocol, simplifying UI flow and result handling within your Android application.\u003c/p\u003e\n"],["\u003cp\u003eYou can use \u003ccode\u003eCreateWalletObjectsRequest\u003c/code\u003e to specify the details of the wallet objects to be created.\u003c/p\u003e\n"]]],[],null,["# WalletObjectsClient\n\npublic class **WalletObjectsClient** extends [GoogleApi](/android/reference/com/google/android/gms/common/api/GoogleApi)\\\u003c[Wallet.WalletOptions](/android/reference/com/google/android/gms/wallet/Wallet.WalletOptions)\\\u003e \nEntry point for Wallet objects functionality. \n\n### Public Method Summary\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Task](/android/reference/com/google/android/gms/tasks/Task)\\\u003c[AutoResolvableVoidResult](/android/reference/com/google/android/gms/wallet/AutoResolvableVoidResult)\\\u003e | [createWalletObjects](/android/reference/com/google/android/gms/wallet/WalletObjectsClient#createWalletObjects(com.google.android.gms.wallet.CreateWalletObjectsRequest))([CreateWalletObjectsRequest](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest) request) Launches a UI allowing the user to save a wallet object (loyalty card, gift card, or offer) to Google Pay. |\n\n### Inherited Method Summary\n\nFrom class com.google.android.gms.common.api.GoogleApi \n\n|-------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|\n| [String](//developer.android.com/reference/java/lang/String.html) | getApiFallbackAttributionTag([Context](//developer.android.com/reference/android/content/Context.html) arg0) |\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Methods\n--------------\n\n#### public [Task](/android/reference/com/google/android/gms/tasks/Task)\\\u003c[AutoResolvableVoidResult](/android/reference/com/google/android/gms/wallet/AutoResolvableVoidResult)\\\u003e\n**createWalletObjects** ([CreateWalletObjectsRequest](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest) request)\n\nLaunches a UI allowing the user to save a wallet object (loyalty card, gift card, or\noffer) to Google Pay.\n\nThis API conforms to the protocol defined by [AutoResolveHelper](/android/reference/com/google/android/gms/wallet/AutoResolveHelper),\nso instead of handling the returned exceptions yourself when UI needs to be shown (i.e.\n[ResolvableApiException](/android/reference/com/google/android/gms/common/api/ResolvableApiException)),\nyou should use the [AutoResolveHelper](/android/reference/com/google/android/gms/wallet/AutoResolveHelper)\nto pipe the results back to [Activity.onActivityResult(int, int, android.content.Intent)](//developer.android.com/reference/android/app/Activity.html#onActivityResult(int,%20int,%20android.content.Intent)). This allows\nyour code to receive the result whether the UI is shown or not. \n\n##### Parameters\n\n| request | An instance of [CreateWalletObjectsRequest](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest) which specifies actual objects to be created |\n|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\n##### Returns\n\n- A Task that should be resolved with [AutoResolveHelper.resolveTask(Task, Activity, int)](/android/reference/com/google/android/gms/wallet/AutoResolveHelper#resolveTask(com.google.android.gms.tasks.Task\u003cTResult\u003e,%20android.app.Activity,%20int))."]]