Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.

BillingClient.BillingResponse

public static abstract @interface BillingClient.BillingResponse
implements Annotation

com.android.billingclient.api.BillingClient.BillingResponse


Possible response codes.

Summary

Constants

int BILLING_UNAVAILABLE

Billing API version is not supported for the type requested

int DEVELOPER_ERROR

Invalid arguments provided to the API.

int ERROR

Fatal error during the API action

int FEATURE_NOT_SUPPORTED

Requested feature is not supported by Play Store on the current device.

int ITEM_ALREADY_OWNED

Failure to purchase since item is already owned

int ITEM_NOT_OWNED

Failure to consume since item is not owned

int ITEM_UNAVAILABLE

Requested product is not available for purchase

int OK

Success

int SERVICE_DISCONNECTED

Play Store service is not connected now - potentially transient state.

int SERVICE_UNAVAILABLE

Network connection is down

int USER_CANCELED

User pressed back or canceled a dialog

Inherited methods

From interface java.lang.annotation.Annotation

Constants

BILLING_UNAVAILABLE

int BILLING_UNAVAILABLE

Billing API version is not supported for the type requested

Constant Value: 3 (0x00000003)

DEVELOPER_ERROR

int DEVELOPER_ERROR

Invalid arguments provided to the API. This error can also indicate that the application was not correctly signed or properly set up for In-app Billing in Google Play, or does not have the necessary permissions in its manifest

Constant Value: 5 (0x00000005)

ERROR

int ERROR

Fatal error during the API action

Constant Value: 6 (0x00000006)

FEATURE_NOT_SUPPORTED

int FEATURE_NOT_SUPPORTED

Requested feature is not supported by Play Store on the current device.

Constant Value: -2 (0xfffffffe)

ITEM_ALREADY_OWNED

int ITEM_ALREADY_OWNED

Failure to purchase since item is already owned

Constant Value: 7 (0x00000007)

ITEM_NOT_OWNED

int ITEM_NOT_OWNED

Failure to consume since item is not owned

Constant Value: 8 (0x00000008)

ITEM_UNAVAILABLE

int ITEM_UNAVAILABLE

Requested product is not available for purchase

Constant Value: 4 (0x00000004)

OK

int OK

Success

Constant Value: 0 (0x00000000)

SERVICE_DISCONNECTED

int SERVICE_DISCONNECTED

Play Store service is not connected now - potentially transient state.

E.g. Play Store could have been updated in the background while your app was still running. So feel free to introduce your retry policy for such use case. It should lead to a call to startConnection(BillingClientStateListener) right after or in some time after you received this code.

Constant Value: -1 (0xffffffff)

SERVICE_UNAVAILABLE

int SERVICE_UNAVAILABLE

Network connection is down

Constant Value: 2 (0x00000002)

USER_CANCELED

int USER_CANCELED

User pressed back or canceled a dialog

Constant Value: 1 (0x00000001)