Reputation: 1533
i'm trying to enable in app billing. I've created In-app-products on my google play console and got my License key. When i try to purchase product. I get this image error.
Here is the code i use to create BillingProcessor.
bp = new BillingProcessor(this, LICENSE_KEY, MERCHANT_ID, new BillingProcessor.IBillingHandler() {
@Override
public void onProductPurchased(@NonNull String productId, @Nullable TransactionDetails details) {
showToast("onProductPurchased: " + productId);
updateTextViews();
}
@Override
public void onBillingError(int errorCode, @Nullable Throwable error) {
showToast("onBillingError: " + Integer.toString(errorCode));
}
@Override
public void onBillingInitialized() {
showToast("onBillingInitialized");
readyToPurchase = true;
updateTextViews();
}
@Override
public void onPurchaseHistoryRestored() {
showToast("onPurchaseHistoryRestored");
for(String sku : bp.listOwnedProducts())
Log.d(LOG_TAG, "Owned Managed Product: " + sku);
for(String sku : bp.listOwnedSubscriptions())
Log.d(LOG_TAG, "Owned Subscription: " + sku);
updateTextViews();
}
});
LICENSE_KEY is my license key from google play console, and MERCHANT_ID is null.
This is how i buy items.
bp.purchase(this,PRODUCT_ID);
Where PRODUCT_ID is product1 which i use in my google play console, here is the example of my in-app products.
Any idea how to fix this ? There is only one stackoverflow question with DF-AA-20 problem which has no answers. And there is no information on the internet about it. I have tried to use emulator and my android phone.
Upvotes: 9
Views: 15589
Reputation: 2414
Just wait some time. I waited 25 minute and then product registered in google play
Upvotes: 2
Reputation: 169
You must publish your app to playstore(not even alpha or beta publish will help).
Upvotes: 0
Reputation: 36
It might be handy to point out that you can also get this exact error code message when you simply haven't put your products as active yet in your Google Play Console. (Even in debug they need to be active.)
Upvotes: 1
Reputation: 13826
DF-AA-20 means your app is not published in any way on the Play store. This is normally because either:
Upvotes: 14
Reputation: 1252
Oh, I had this exception when I tested buys in my product with different sku.
Check your sku!
Sku must be not CAPS! Only [a-z][0-9]!
Upvotes: 7