Package com.prineside.tdi2
Class OkPurchaseManager
java.lang.Object
com.prineside.tdi2.OkPurchaseManager
- All Implemented Interfaces:
com.badlogic.gdx.pay.InformationFinder,com.badlogic.gdx.pay.PurchaseManager
public abstract class OkPurchaseManager
extends Object
implements com.badlogic.gdx.pay.PurchaseManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Disposes the purchase manager.com.badlogic.gdx.pay.InformationgetInformation(String identifier) Returns information about a product provided by the purchase manager.voidinstall(com.badlogic.gdx.pay.PurchaseObserver observer, com.badlogic.gdx.pay.PurchaseManagerConfig config, boolean autoFetchInformation) Registers a purchase observer which handles installs of apps on a new device or aborted purchases from a previous session that were not yet handled by the application.booleanReturns true if the purchase manager is installed (non-disposed) and ready to go.voidRequests to purchase an item.abstract voidpurchaseOk(String okIapId, String productId) voidRestores existing purchases.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.badlogic.gdx.pay.PurchaseManager
storeName
-
Constructor Details
-
OkPurchaseManager
public OkPurchaseManager()
-
-
Method Details
-
getInformation
Description copied from interface:com.badlogic.gdx.pay.InformationFinderReturns information about a product provided by the purchase manager.- Specified by:
getInformationin interfacecom.badlogic.gdx.pay.InformationFinder- Returns:
- the information for given identifier, or
Information.UNAVAILABLEif no product for givenidentifieris loaded.
-
install
public void install(com.badlogic.gdx.pay.PurchaseObserver observer, com.badlogic.gdx.pay.PurchaseManagerConfig config, boolean autoFetchInformation) Description copied from interface:com.badlogic.gdx.pay.PurchaseManagerRegisters a purchase observer which handles installs of apps on a new device or aborted purchases from a previous session that were not yet handled by the application. The observer is called for all unfinished transactions. The observer is also called for refunds of previous purchased items.Registering an observer is required. If no observer is registered the call to purchase an item will fail with a runtime exception to teach you lesson to always remember to set a purchase observer. The purchase observer is needed to make sure all purchases have been handled and served to the customer.
- Specified by:
installin interfacecom.badlogic.gdx.pay.PurchaseManager- Parameters:
observer- The observer which is called whenever purchases have to be handled by the application as well as when the store has been installed.config- The configuration. Please note offers inside the configuration can be updated on the fly (e.g. byautoFetchInformation- tells PurchaseManager to automatically fetch offer details on setup
-
installed
public boolean installed()Description copied from interface:com.badlogic.gdx.pay.PurchaseManagerReturns true if the purchase manager is installed (non-disposed) and ready to go.- Specified by:
installedin interfacecom.badlogic.gdx.pay.PurchaseManager
-
dispose
public void dispose()Description copied from interface:com.badlogic.gdx.pay.PurchaseManagerDisposes the purchase manager.- Specified by:
disposein interfacecom.badlogic.gdx.pay.PurchaseManager
-
purchaseOk
-
purchase
Description copied from interface:com.badlogic.gdx.pay.PurchaseManagerRequests to purchase an item. The listener will always be called once the purchase has either completed or failed.Note: a GDX runtime exception is thrown if you have not registered a purchase observer.
- Specified by:
purchasein interfacecom.badlogic.gdx.pay.PurchaseManager- Parameters:
identifier- The item to purchase.
-
purchaseRestore
public void purchaseRestore()Description copied from interface:com.badlogic.gdx.pay.PurchaseManagerRestores existing purchases.- Specified by:
purchaseRestorein interfacecom.badlogic.gdx.pay.PurchaseManager
-