Class IOSInAppBillingService

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javafx.concurrent.Worker<java.util.List<Product>> fetchProductDetails()
      Retrieves the details for the current list of available in-app products.
      javafx.concurrent.Worker<Product> finish​(ProductOrder productOrder)
      Finish a product order for a consumable product.
      void initialize​(java.lang.String androidPublicKey, java.util.List<Product> registeredProducts)
      Correctly initialize the In-App Billing service on the device.
      boolean isReady()  
      boolean isSupported()
      Returns true if the device supports in-app billing.
      javafx.concurrent.Worker<ProductOrder> order​(Product product)
      Place a new order for the specified product.
      javafx.beans.property.ReadOnlyBooleanProperty readyProperty()  
      void setQueryResultListener​(InAppBillingQueryResultListener listener)
      Set a query listener to listen for results of asynchronous queries of the registered in-app products.
      void setRegisteredProducts​(java.util.List<Product> registeredProducts)
      Updates the list of available products that are configured in the in-app product sections of the application configuration for iOS and Android.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IOSInAppBillingService

        public IOSInAppBillingService()
    • Method Detail

      • isSupported

        public boolean isSupported()
        Description copied from interface: InAppBillingService
        Returns true if the device supports in-app billing.
        Specified by:
        isSupported in interface InAppBillingService
        Returns:
        True if the device supports in-app billing.
      • setRegisteredProducts

        public void setRegisteredProducts​(java.util.List<Product> registeredProducts)
        Description copied from interface: InAppBillingService
        Updates the list of available products that are configured in the in-app product sections of the application configuration for iOS and Android.
        Specified by:
        setRegisteredProducts in interface InAppBillingService
        Parameters:
        registeredProducts - a list of available in-app products
      • initialize

        public void initialize​(java.lang.String androidPublicKey,
                               java.util.List<Product> registeredProducts)
        Description copied from interface: InAppBillingService
        Correctly initialize the In-App Billing service on the device. This makes sure that everything is in place before you can start interacting with the methods that deal with the actual in-app products.

        When initialization completed successfully, a query will be triggered to fetch the initial purchase details for each registered in-app product. You should set a query listener to act upon the results of that query.

        Specified by:
        initialize in interface InAppBillingService
        Parameters:
        androidPublicKey - the license key of your Android application which can be found in the Google Play developer console.
        registeredProducts - a list of available in-app products that are configured in your application configuration for iOS and Android
      • fetchProductDetails

        public javafx.concurrent.Worker<java.util.List<Product>> fetchProductDetails()
        Description copied from interface: InAppBillingService
        Retrieves the details for the current list of available in-app products. In case a product from the list of registered products could not be queried, they will not be listed in the returned list. This method must be called to get the details of each registered product, like the title, description and localised price and currency. You can use these details to build up your UI.
        Specified by:
        fetchProductDetails in interface InAppBillingService
        Returns:
        A list of products for which the details could be fetched, wrapped in a Worker.
      • order

        public javafx.concurrent.Worker<ProductOrder> order​(Product product)
        Description copied from interface: InAppBillingService
        Place a new order for the specified product. The returned Worker can be used to determine if the order was successful.
        Specified by:
        order in interface InAppBillingService
        Parameters:
        product - the product to place an order for
        Returns:
        A ProductOrder containing details about the processed order, wrapped in a Worker.
      • finish

        public javafx.concurrent.Worker<Product> finish​(ProductOrder productOrder)
        Description copied from interface: InAppBillingService
        Finish a product order for a consumable product. The product order will not have been processed (and no money will have been transferred) until the order is finished.
        Specified by:
        finish in interface InAppBillingService
        Parameters:
        productOrder - the product order to finish
        Returns:
        The product that was ordered with in the provided ProductOrder with updated details, wrapped in a Worker.