How to check sku of consumed product inside onPurchaseConsumed

inside of onPurchaseConsumed method how can I check which item has just been consumed? In your example you state
// We know this is the "gas" sku because it's the only one we consume,
// so we don't check which sku was consumed. If you have more than one
// sku, you probably should check...

So how can I check it?

How to check sku (IAP)


It's really up to you how you want to keep track of this. When calling inAppHelper.consumePurchase you can keep a reference of the SKU purchase that it's being consumed. When onPurchaseConsumed is called it's going to be for that same SKU that you requested the consume.

How to check sku (IAP)

Thanks for your answer.
I really think you should add second parameter to onPurchaseConsumed which tells the sku the result is connected with, because it's error prone to depend on some variable.