I have implemented in app purchase to my application by following the google's documentation. Everything works fine as expected, I can purchase items and after deleting the application I can restore my managed purchases with this code there has been no problem so far.
IabHelper.QueryInventoryFinishedListener mGotInventoryListener
= new IabHelper.QueryInventoryFinishedListener() {
public void onQueryInventoryFinished(IabResult result,
Inventory inventory) {
if (result.isFailure()) {
// handle error here
}
else {
// does the user have the premium upgrade?
mIsPremium = inventory.hasPurchase(SKU_PREMIUM);
// update UI accordingly
}
}};
Here is the part I want to know about, if I remove and re-add my account that I made purchases and try to query my inventory it returns null, so I can't restore my purchases and when I try to buy it again it returns with message : You already own this item.
Also my app and in app products are currently published on alfa and I'm using same keystore(publish keystore) and same version code.
So am I missing something, any help is appreciated.