Closed vuongthanhtai closed 9 years ago
Currently gdx-pay doesn't contain an inventory class until someone implements it (sorry)! Right now, you need to keep track of purchased items yourself.
I suggest you implement a Inventory.java
class where you keep track of all purchased items. Instead of using PurchaseSystem/Manager directly you would only use your Inventory.java class which every time you restore/purchase will automatically keep track of items purchased in a properties file. That way you could then check for purchased items via boolean hasPurchased(identifier)
or something along that line. Inventory.java
should duplicate the methods in PurchaseManager
.
:) Ok
I need a method for this: // Do we have the premium upgrade? Purchase premiumPurchase = inventory.getPurchase(SKU_PREMIUM); mIsPremium = (premiumPurchase != null && verifyDeveloperPayload(premiumPurchase)); Log.d(TAG, "User is " + (mIsPremium ? "PREMIUM" : "NOT PREMIUM"));
can u add more interface in PurchaseManager to check products purchased. I think you should make an example as TrivialDrive.