Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android In-app robotmedia: Restore Transactions

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).

like image 281
Carl K. Avatar asked Apr 25 '12 06:04

Carl K.


1 Answers

try to use InApp version3.0, the reference is available here. the google team made it very easy to developers. there is no service at all, really simple and it was working pretty good to me....

like image 190
kalandar Avatar answered Sep 23 '22 04:09

kalandar