mirror of
https://github.com/defold/extension-iap
synced 2025-06-27 02:17:51 +02:00
33 lines
1.3 KiB
Java
33 lines
1.3 KiB
Java
package com.defold.iap;
|
|
|
|
public class IapJNI implements IListProductsListener, IPurchaseListener {
|
|
|
|
// NOTE: Also defined in iap.h
|
|
public static final int TRANS_STATE_PURCHASING = 0;
|
|
public static final int TRANS_STATE_PURCHASED = 1;
|
|
public static final int TRANS_STATE_FAILED = 2;
|
|
public static final int TRANS_STATE_RESTORED = 3;
|
|
public static final int TRANS_STATE_UNVERIFIED = 4;
|
|
|
|
public static final int BILLING_RESPONSE_RESULT_OK = 0;
|
|
public static final int BILLING_RESPONSE_RESULT_USER_CANCELED = 1;
|
|
public static final int BILLING_RESPONSE_RESULT_SERVICE_UNAVAILABLE = 2;
|
|
public static final int BILLING_RESPONSE_RESULT_BILLING_UNAVAILABLE = 3;
|
|
public static final int BILLING_RESPONSE_RESULT_ITEM_UNAVAILABLE = 4;
|
|
public static final int BILLING_RESPONSE_RESULT_DEVELOPER_ERROR = 5;
|
|
public static final int BILLING_RESPONSE_RESULT_ERROR = 6;
|
|
public static final int BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED = 7;
|
|
public static final int BILLING_RESPONSE_RESULT_ITEM_NOT_OWNED = 8;
|
|
public static final int BILLING_RESPONSE_RESULT_NETWORK_ERROR = 9;
|
|
|
|
public IapJNI() {
|
|
}
|
|
|
|
@Override
|
|
public native void onProductsResult(int responseCode, String productList, long cmdHandle);
|
|
|
|
@Override
|
|
public native void onPurchaseResult(int responseCode, String purchaseData);
|
|
|
|
}
|