I'm trying to implement an in-app purchase functionality with the help of the net.robotmedia.billing library.
The purchase of an in-app item (managed) works: the purchase is made, there's an order in google checkout, and later when I restart the device for example, when restoring the transactions the "purchase" state can be retrieved.
When I uninstall and reinstall the app, after restoring the transactions the purchase state can be detected. However, this time something (probably the Market app) sends a "Purchase failed"-notification. The transaction history (after a purchase) always is:
8x Transaction.PurchaseState.CANCELLED
followed by one Transaction.PurchaseState.PURCHASED
.
The "Purchase failed."-notification is sent even though no purchase has been made. In the initialization I do:
BillingController.setConfiguration(mConfiguration);
BillingController.registerObserver(myBillingObserver);
...
BillingController.checkBillingSupported(this);
BillingController.restoreTransactions(this);
Everything seems to work, only that I get this notification. How do I get rid of this notification? Or is there perhaps something I might have missed?
UPDATE: The above mentioned cancelled transactions are just the history which is correct. Still the market app (I assume) sends a "Purchase failed"-notification on RESTORE_TRANSACTIONS (I assume when I receive these cancelled transactions).
Perhaps this is not important since a user does not cancel, re-purchase, cancel, re-purchase, etc. But once a transaction is cancelled, the user will receive this notification whenever the restoring is processed which is annoying (and confusing for the user).