# Print output for @column tags ?>
public
static
abstract
@interface
BillingClient.BillingResponseCode
implements
Annotation
| com.android.billingclient.api.BillingClient.BillingResponseCode |
Possible response codes.
Constants | |
|---|---|
int |
BILLING_UNAVAILABLE
A user billing error occurred during processing. |
int |
DEVELOPER_ERROR
Error resulting from incorrect usage of the API. |
int |
ERROR
Fatal error during the API action. |
int |
FEATURE_NOT_SUPPORTED
The requested feature is not supported by the Play Store on the current device. |
int |
ITEM_ALREADY_OWNED
The purchase failed because the item is already owned. |
int |
ITEM_NOT_OWNED
Requested action on the item failed since it is not owned by the user. |
int |
ITEM_UNAVAILABLE
The requested product is not available for purchase. |
int |
NETWORK_ERROR
A network error occurred during the operation. |
int |
OK
Success. |
int |
SERVICE_DISCONNECTED
The app is not connected to the Play Store service via the Google Play Billing Library. |
int |
SERVICE_TIMEOUT
This constant is deprecated.
See |
int |
SERVICE_UNAVAILABLE
The service is currently unavailable. |
int |
USER_CANCELED
Transaction was canceled by the user. |
Inherited methods | |
|---|---|
public static final int BILLING_UNAVAILABLE
A user billing error occurred during processing.
Examples where this error may occur:
Letting the user retry may succeed if the condition causing the error has changed (e.g. An enterprise user's admin has allowed purchases for the organization).
Constant Value: 3 (0x00000003)
public static final int DEVELOPER_ERROR
Error resulting from incorrect usage of the API.
Examples where this error may occur:
Constant Value: 5 (0x00000005)
public static final int ERROR
Fatal error during the API action.
This is an internal Google Play error that may be transient or due to an unexpected condition during processing. You can automatically retry (e.g. with exponential back off) for this case and contact Google Play if issues persist. Be mindful of how long you retry if the retry is happening during a user interaction.
Constant Value: 6 (0x00000006)
public static final int FEATURE_NOT_SUPPORTED
The requested feature is not supported by the Play Store on the current device.
If your app would like to check if a feature is supported before trying to use the feature
your app can call BillingClient.isFeatureSupported(String) to check if a feature is supported. For
a list of feature types that can be supported, see BillingClient.FeatureType.
For example: Before calling BillingClient.showInAppMessages(Activity, InAppMessageParams, InAppMessageResponseListener) API, you can call BillingClient.isFeatureSupported(String) with the
BillingClient.FeatureType.IN_APP_MESSAGING featureType to check if it is supported.
Constant Value: -2 (0xfffffffe)
public static final int ITEM_ALREADY_OWNED
The purchase failed because the item is already owned.
Make sure your app is up-to-date with recent purchases using guidance in the Fetching purchases section in the integration guide. If this error occurs despite making the check for recent purchases, then it may be due to stale purchase information that was cached on the device by Play. When you receive this error, the cache should get updated. After this, your purchases should be reconciled, and you can process them as outlined in the processing purchases section in the integration guide.
Constant Value: 7 (0x00000007)
public static final int ITEM_NOT_OWNED
Requested action on the item failed since it is not owned by the user.
Make sure your app is up-to-date with recent purchases using guidance in the Fetching purchases section in the integration guide. If this error occurs despite making the check for recent purchases, then it may be due to stale purchase information cached on the device by Play. When you receive this error, the cache should get updated. After this, your purchases should be reconciled, and you can process the purchases accordingly. For example, if you are trying to consume an item and if the updated purchase information says it is already consumed, you can ignore the error now.
Constant Value: 8 (0x00000008)
public static final int ITEM_UNAVAILABLE
The requested product is not available for purchase.
Please ensure the product is available in the user’s country. If you recently changed the country availability and are still receiving this error then it may be because of a propagation delay.
Constant Value: 4 (0x00000004)
public static final int NETWORK_ERROR
A network error occurred during the operation.
This error indicates that there was a problem with the network connection between the device and Play systems. This could potentially also be due to the user not having an active network connection.
Constant Value: 12 (0x0000000c)
public static final int OK
Success.
Constant Value: 0 (0x00000000)
public static final int SERVICE_DISCONNECTED
The app is not connected to the Play Store service via the Google Play Billing Library.
Examples where this error may occur:
BillingClient.startConnection(BillingClientStateListener) was never called or has not
completed yet.
BillingClient.startConnection(BillingClientStateListener) right after or in some time after you received
this code.
Constant Value: -1 (0xffffffff)
public static final int SERVICE_TIMEOUT
This constant is deprecated.
See SERVICE_UNAVAILABLE which will be used instead of this code.
The request has reached the maximum timeout before Google Play responds.
Since this state is transient, your app should automatically retry (e.g. with exponential back off) to recover from this error. Be mindful of how long you retry if the retry is happening during a user interaction.
Constant Value: -3 (0xfffffffd)
public static final int SERVICE_UNAVAILABLE
The service is currently unavailable.
Since this state is transient, your app should automatically retry (e.g. with exponential back off) to recover from this error. Be mindful of how long you retry if the retry is happening during a user interaction.
Constant Value: 2 (0x00000002)
public static final int USER_CANCELED
Transaction was canceled by the user.
Constant Value: 1 (0x00000001)