Reputation: 1
I have used Android in-app-purchase in my app. When I test buying the item, the first time is OK, but for the second time, the UI only shows the account name, no CreditCard info. On the center button, it shows "accept & download". But if you press button, nothing happens. Could sombody tell me what is wrong?
Upvotes: 0
Views: 226
Reputation: 1026
The item the you bought is probably a managed item. Search for "Purchase Types" in http://developer.android.com/guide/google/play/billing/billing_overview.html#billing-types for more information. So, the second time you try to buy it Google Play won't let because you already bought. Nothing happens because Google Play cannot force your app to initiate a download of the already bought product. I'm not sure but I think that a PURCHASE_STATE_CHANGED broadcast Intent is not sent when the a person press the "Accept & Download" buttom.
To avoid this situation you can either use an unmanaged product (unfortunately you cannot change your existing product to unmanaged), or you can make the buy button disappear once it item is bought. In the later case you might also want to use RESTORE_TRANSACTIONS in the case the app is reinstalled.
Upvotes: 1