Class IOSInAppBillingService
java.lang.Object
com.gluonhq.attach.inappbilling.impl.IOSInAppBillingService
- All Implemented Interfaces:
InAppBillingService
-
Property Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the details for the current list of available in-app products.javafx.concurrent.Worker<Product>
finish
(ProductOrder productOrder) Finish a product order for aconsumable
product.void
initialize
(String androidPublicKey, List<Product> registeredProducts) Correctly initialize the In-App Billing service on the device.boolean
isReady()
Gets the value of the property ready.boolean
Returns true if the device supports in-app billing.javafx.concurrent.Worker<ProductOrder>
Place a new order for the specified product.javafx.beans.property.ReadOnlyBooleanProperty
void
Set a query listener to listen for results of asynchronous queries of the registered in-app products.void
setRegisteredProducts
(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.
-
Property Details
-
ready
public javafx.beans.property.ReadOnlyBooleanProperty readyProperty- Specified by:
readyProperty
in interfaceInAppBillingService
- See Also:
-
-
Constructor Details
-
IOSInAppBillingService
public IOSInAppBillingService()
-
-
Method Details
-
isSupported
public boolean isSupported()Description copied from interface:InAppBillingService
Returns true if the device supports in-app billing.- Specified by:
isSupported
in interfaceInAppBillingService
- Returns:
- True if the device supports in-app billing.
-
setQueryResultListener
Description copied from interface:InAppBillingService
Set a query listener to listen for results of asynchronous queries of the registered in-app products.- Specified by:
setQueryResultListener
in interfaceInAppBillingService
- Parameters:
listener
- the query listener to set
-
setRegisteredProducts
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 interfaceInAppBillingService
- Parameters:
registeredProducts
- a list of available in-app products
-
initialize
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 interfaceInAppBillingService
- 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
-
isReady
public boolean isReady()Gets the value of the property ready.- Specified by:
isReady
in interfaceInAppBillingService
- Property description:
-
readyProperty
public javafx.beans.property.ReadOnlyBooleanProperty readyProperty()- Specified by:
readyProperty
in interfaceInAppBillingService
- See Also:
-
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 interfaceInAppBillingService
- Returns:
- A list of products for which the details could be fetched, wrapped in a Worker.
-
order
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 interfaceInAppBillingService
- Parameters:
product
- the product to place an order for- Returns:
- A ProductOrder containing details about the processed order, wrapped in a Worker.
-
finish
Description copied from interface:InAppBillingService
Finish a product order for aconsumable
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 interfaceInAppBillingService
- 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.
-