Package 

Class InAppPurchaseLibrary

    • Method Detail

      • onReady

         static void onReady(Context context, @Nullable() JSONObject parameters, DaemonRequest.Callback callback)

        Sets a callback to be triggered when Payments operations are available.

        Parameters:
        context - the application context
        parameters - {}
        callback - callback for success and error
      • getPurchases

         static void getPurchases(Context context, @Nullable() JSONObject parameters, DaemonRequest.Callback callback)

        Fetches all of the player's unconsumed purchases. The game must fetch the current player'spurchases as soon as the client indicates that it is ready to perform payments-relatedoperations, i.e. at game start. The game can then process and consume any purchases that arewaiting to be consumed.

        Parameters:
        context - the application context
        parameters - {}
        callback - callback for success and error
      • purchase

         static void purchase(Context context, JSONObject parameters, DaemonRequest.Callback callback)

        Begins the purchase flow for a specific product.

        Parameters:
        context - the application context
        parameters - { PRODUCT_ID: , DEVELOPER_PAYLOAD (optional):
        callback - callback for success and error
      • consumePurchase

         static void consumePurchase(Context context, JSONObject parameters, DaemonRequest.Callback callback)

        Consumes a specific purchase belonging to the current player. Before provisioning a product'seffects to the player, the game should request the consumption of the purchased product. Oncethe purchase is successfully consumed, the game should immediately provide the player with theeffects of their purchase.

        Parameters:
        context - the application context
        parameters - { PURCHASE_TOKEN: }
        callback - callback for success and error