I folloed this tutorial to implement in-app in my application: http://blog.blundell-apps.com/simple-inapp-billing-payment/
The user can now purchase my item (com.myitem) with in-app system. After that, I set in a Shared Preference that the user has been purchased the item.
The problem is if the user uninstalla and reinstall the app. So the question is: how can I check if the user has been already purchased the item?
I know that I should use restore BillingHelper.restoreTransactionInformation(...) on RESTORE_TRANSACTION...but where, and how?
I checked Dungeon example, but it seems to hard and complex to unterstand. There's a simple way to do that?
Thank you
Using RESTORE_TRANSACTION is the only way if you use managed purchases. If you use unmanagaed purchases, you can store the purchase state on your own server, but that is hardly simpler. There is nothing complex about RESTORE_TRANSACTIONS: you just fire the command and you get notified with transaction information that is in the exact same format as what you get when you first purchase an item. You should process it in the exact same way, and chances are you already have the code for that in your app. Testing this is somewhat harder, because it doesn't really work with test accounts, and you need a live app. Go over the official documentation again to understand how it works.