Android In-App Question regarding bought non-consumable product

I have some problems understanding the correct take on iaps on Android. For example:

A user has bought a non-consumable product he only can buy once.

Now he deletes the game and re-installs it again.

Now he clicks the buy button for the same product and nothing happens.

How can I check in the transactionListener that the user already has this product because just trying to purchase it again is just quitting the transaction?

Is it possible to right before doing a store.purchase(product) call directly do a store.restore() call? This would automatically unlock a purchased product when the user is clicking on the products button. Or is this causing problems for users who try to purchase the product but don’t have bought it before?

One more thing:

What if a product was refunded? Do I have to consume a non-consumable to make it ready to buy again or is it automatically handled when a refund was made?

On Android, it’s recommended you do a store.restore() when the application starts up.  That way, you can remove the option to buy before the user even gets that far, so this situation never occurs.

Refunds: my solution is, before you do your store.restore() on initialisation, remove access to all non-consumable products.  The restore listener will prompt you to give access to the ones the user still has a right to anyway (so the refunded product gets removed)

Simon

On Android, it’s recommended you do a store.restore() when the application starts up.  That way, you can remove the option to buy before the user even gets that far, so this situation never occurs.

Refunds: my solution is, before you do your store.restore() on initialisation, remove access to all non-consumable products.  The restore listener will prompt you to give access to the ones the user still has a right to anyway (so the refunded product gets removed)

Simon