I am trying to implement in app purchasing and have had problems for days. When a user attempts to make a purchase it is successful but the app is giving an odd error that apparently dates back to os build honeycomb which prevents users from receiving the purchase until they click the buy button again.
Steps:
Make purchase
Purchase successful
No consumable given
Click purchase button again
Consumable given
Here is the error I am getting when the consumable isn't given:
Log Tag: Finsky
Log Message [1] 1.run: missing delivery data for inapp:com.mybillingproblem:one_chip
PID/TID: 26927
Code:
public void oneChip(String noVal) {
Log.v("oneChip", "Calling launch purchase flow");
bp.purchase(this, itemOne);
Log.v("oneChip", "made it through launch purchase flow");
}
bp = new BillingProcessor(this, base64EncodedPublicKey,
new BillingProcessor.IBillingHandler() {
@Override
public void onBillingInitialized() {
Log.v("chip", "billing initialized");
readyToPurchase = true;
}
@Override
public void onProductPurchased(String productId,
TransactionDetails details) {
Log.v("chip", productId + " purchased");
if (bp.consumePurchase(productId)) {
if (productId == "itemOne"
|| productId == "one_chip")
ChipUpdate.updateChipCount(2500);
}
}
@Override
public void onBillingError(int errorCode, Throwable error) {
Log.v("chip", "Error code: " + errorCode);
Log.v("chip", "Error: " + error);
}
@Override
public void onPurchaseHistoryRestored() {
for (String sku : bp.listOwnedProducts())
Log.v("chip", "Owned Managed Product: " + sku);
for (String sku : bp.listOwnedSubscriptions())
Log.v("chip", "Owned Subscription: " + sku);
}
});
Note: I am using the in app billing v3 jar. I don't think this is the issue though as it has come recommended and seems to be a commonly used wrapper.
Thanks!