public final class

Wallet

extends Object
java.lang.Object
   ↳ com.google.android.gms.wallet.Wallet

Class Overview

The main entry point for Google Wallet integration. You need to build a GoogleApiClient using the API and the appropriate Wallet.WalletOptions. Once you have called connect() and your listener has received the onConnected(android.os.Bundle) callback, then you can call the various Wallet APIs.

When your app is done using Wallet, call disconnect(), even if the async result from connect() has not yet been delivered.

You should instantiate an instance of GoogleApiClient in your Activity's onCreate(Bundle) method and then call connect() in onStart() and disconnect() in onStop(), regardless of the state.

For comments and requirements specific to different Wallet APIs, please see each API interface's header comments.

Summary

Nested Classes
class Wallet.WalletOptions Options for using the Wallet API. 
Fields
public static final Api<Wallet.WalletOptions> API Add this to your GoogleApiClient via addApi(Api) to enable Wallet features.
public static final Payments Payments Methods for interacting with Wallet payments APIs.
Public Methods
static PaymentsClient getPaymentsClient(Activity activity, Wallet.WalletOptions options)
Create a new instance of PaymentsClient for use in an Activity.
static PaymentsClient getPaymentsClient(Context context, Wallet.WalletOptions options)
Create a new instance of PaymentsClient for use in a non-Activity Context.
static WalletObjectsClient getWalletObjectsClient(Activity activity, Wallet.WalletOptions options)
Create a new instance of WalletObjectsClient for use in an Activity.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final Api<Wallet.WalletOptions> API

Add this to your GoogleApiClient via addApi(Api) to enable Wallet features.

To configure additional Wallet options, provide a Wallet.WalletOptions object to addApi(Api).

public static final Payments Payments

Methods for interacting with Wallet payments APIs.

Deprecated. Use getPaymentsClient(Activity, WalletOptions) or getPaymentsClient(Context, WalletOptions) instead.

Public Methods

public static PaymentsClient getPaymentsClient (Activity activity, Wallet.WalletOptions options)

Create a new instance of PaymentsClient for use in an Activity.

Parameters
activity Activity: is the caller's activity.
options Wallet.WalletOptions: are the Wallet.WalletOptions for configuring the API.
Returns
PaymentsClient

public static PaymentsClient getPaymentsClient (Context context, Wallet.WalletOptions options)

Create a new instance of PaymentsClient for use in a non-Activity Context.

Parameters
context Context: is the caller's (Application)Context.
options Wallet.WalletOptions: are the Wallet.WalletOptions for configuring the API.
Returns
PaymentsClient

public static WalletObjectsClient getWalletObjectsClient (Activity activity, Wallet.WalletOptions options)

Create a new instance of WalletObjectsClient for use in an Activity. This client should not be used outside of the given activity.

Parameters
activity Activity
options Wallet.WalletOptions
Returns
WalletObjectsClient