Controller

object Controller

Controller for the purchase and verification process of the premium version of the app.

Functions

Link copied to clipboard
fun checkPremium(context: Context)

Check if the user has premium privileges, and report the result using the listener's onCheckPremium().

Link copied to clipboard
fun getSkuDetails(context: Context, skuList: List<String>)

Starts the process to get the details of products based on their sku (id).

Link copied to clipboard
fun init(context: Context, premiumSkus: List<String>)

Initialize and configure the utility, it must always be called only once from the app.

Link copied to clipboard
fun removeListener()

Removes the current listener.

Link copied to clipboard
fun setListener(listener: Premium.Listener)

Set the listener to be used when an event occurs.

Link copied to clipboard
fun startPurchase(activity: Activity, sku: String)

Start the purchase flow of the integrated product that grants the premium benefits.