-
- All Implemented Interfaces:
-
kotlinx.coroutines.CoroutineScope
public class PLYManager implements CoroutineScope
-
-
Field Summary
Fields Modifier and Type Field Description private final CoroutineContextcoroutineContextprivate Contextcontextprivate final <ERROR CLASS>storageprivate JobconfigureJobpublic final static PLYManagerINSTANCE
-
Method Summary
Modifier and Type Method Description final Unitconfigure(Function2<Boolean, PLYError, Unit> initialized)final Unitclose()final BooleanisInitialized()final Pair<Boolean, String>isConfigured()The Booleanvalue indicates whether the app is configured correctly.final Unitpurchase(Activity activity, PLYPlan plan, PLYPromoOffer offer)final <ERROR CLASS>checkReceipt(String receiptId)final UnitrestorePurchases(Boolean isSilent)final UnitsynchronizePurchases()final List<PLYSubscriptionData>getUserSubscriptions()final List<PLYSubscriptionData>getInternalUserSubscriptions()CoroutineContextgetCoroutineContext()final ContextgetContext()final UnitsetContext(Context context)final <ERROR CLASS>getStorage()final JobgetConfigureJob()final UnitsetConfigureJob(Job configureJob)-
-
Method Detail
-
isInitialized
final Boolean isInitialized()
-
isConfigured
final Pair<Boolean, String> isConfigured()
The
Booleanvalue indicates whether the app is configured correctly. TheStringvalue indicates the reason why the app is not configured correctly, if it is not configured correctly.The app is considered to be configured correctly if all of the following conditions are met:
The
PLYStoreManagerhas a store.The
storagehas at least one product.The
PLYManagerhas a context.
-
purchase
final Unit purchase(Activity activity, PLYPlan plan, PLYPromoOffer offer)
-
checkReceipt
final <ERROR CLASS> checkReceipt(String receiptId)
-
restorePurchases
final Unit restorePurchases(Boolean isSilent)
-
synchronizePurchases
final Unit synchronizePurchases()
-
getUserSubscriptions
final List<PLYSubscriptionData> getUserSubscriptions()
-
getInternalUserSubscriptions
final List<PLYSubscriptionData> getInternalUserSubscriptions()
-
getCoroutineContext
CoroutineContext getCoroutineContext()
-
getContext
final Context getContext()
-
setContext
final Unit setContext(Context context)
-
getStorage
final <ERROR CLASS> getStorage()
-
getConfigureJob
final Job getConfigureJob()
-
setConfigureJob
final Unit setConfigureJob(Job configureJob)
-
-
-
-