just comment or remove your code from OnIabPurchaseFinishedListener "mHelper.consumeAsync(purchase, mConsumeFinishedListener);"
If you prefer Android default Trivial demo then go for the premium product purchase for the single time product purchase.
OnIabPurchaseFinishedListener()
// Callback for when a purchase is finished
IabHelper.OnIabPurchaseFinishedListener mPurchaseFinishedListener = new IabHelper.OnIabPurchaseFinishedListener() {
public void onIabPurchaseFinished(IabResult result, Purchase purchase) {
Log.d(TAG, "Purchase finished: " + result + ", purchase: "
+ purchase);
if (result.isFailure()) {
complain("Error purchasing: " + result);
// setWaitScreen(false);
return;
}
if (!verifyDeveloperPayload(purchase)) {
complain("Error purchasing. Authenticity verification failed.");
// setWaitScreen(false);
return;
}
Log.d(TAG, "Purchase successful.");
if (purchase.getSku().equals(SKU_PREMIUM)) {
// bought the premium upgrade!
Log.d(TAG, "Purchase is premium upgrade. Congratulating user.");
alert("Thank you for upgrading to premium!");
}
}
};
Explaination why it gives null data :
Keep it mind that Google will store data from their side only when you are trying to purchase one time purchase product. But Whenever you purchased consumable item google play store will not be managed it's product purchased detail and other things in the Google play console. That's why we have to call consumeAsync() method. when we purchased item, Google play store keep record item has been purchased for the one time and allow you to purchased second time.
for more information : android: Inapp billing: Error response: 7:Item Already Owned
But, Here you are trying to purchase product as a single time purchase so you must not need to call consumeAsync() method in onIabPurchasedFinishListener.
Hope it will solve your problem.