Object AdaptyUI
-
- All Implemented Interfaces:
public class AdaptyUI
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classAdaptyUI.Actionpublic final classAdaptyUI.LocalizedViewConfigurationpublic final classAdaptyUI.MediaCacheConfigurationpublic enumAdaptyUI.ClearCacheStrategy
-
Method Summary
Modifier and Type Method Description final static AdaptyPaywallViewgetPaywallView(Activity activity, AdaptyUI.LocalizedViewConfiguration viewConfiguration, List<AdaptyPaywallProduct> products, AdaptyUiEventListener eventListener, AdaptyPaywallInsets insets, AdaptyUiPersonalizedOfferResolver personalizedOfferResolver, AdaptyCustomAssets customAssets, AdaptyUiTagResolver tagResolver, AdaptyUiTimerResolver timerResolver, AdaptyUiObserverModeHandler observerModeHandler)Right after receiving LocalizedViewConfiguration, you can create the corresponding AdaptyPaywallView to display it afterwards. final static AdaptyPaywallViewgetPaywallView(Activity activity, AdaptyUI.LocalizedViewConfiguration viewConfiguration, List<AdaptyPaywallProduct> products, AdaptyUiEventListener eventListener, AdaptyPaywallInsets insets, AdaptyUiPersonalizedOfferResolver personalizedOfferResolver, AdaptyCustomAssets customAssets, AdaptyUiTagResolver tagResolver, AdaptyUiTimerResolver timerResolver)Right after receiving LocalizedViewConfiguration, you can create the corresponding AdaptyPaywallView to display it afterwards. final static AdaptyPaywallViewgetPaywallView(Activity activity, AdaptyUI.LocalizedViewConfiguration viewConfiguration, List<AdaptyPaywallProduct> products, AdaptyUiEventListener eventListener, AdaptyPaywallInsets insets, AdaptyUiPersonalizedOfferResolver personalizedOfferResolver, AdaptyCustomAssets customAssets, AdaptyUiTagResolver tagResolver)Right after receiving LocalizedViewConfiguration, you can create the corresponding AdaptyPaywallView to display it afterwards. final static AdaptyPaywallViewgetPaywallView(Activity activity, AdaptyUI.LocalizedViewConfiguration viewConfiguration, List<AdaptyPaywallProduct> products, AdaptyUiEventListener eventListener, AdaptyPaywallInsets insets, AdaptyUiPersonalizedOfferResolver personalizedOfferResolver, AdaptyCustomAssets customAssets)Right after receiving LocalizedViewConfiguration, you can create the corresponding AdaptyPaywallView to display it afterwards. final static AdaptyPaywallViewgetPaywallView(Activity activity, AdaptyUI.LocalizedViewConfiguration viewConfiguration, List<AdaptyPaywallProduct> products, AdaptyUiEventListener eventListener, AdaptyPaywallInsets insets, AdaptyUiPersonalizedOfferResolver personalizedOfferResolver)Right after receiving LocalizedViewConfiguration, you can create the corresponding AdaptyPaywallView to display it afterwards. final static AdaptyPaywallViewgetPaywallView(Activity activity, AdaptyUI.LocalizedViewConfiguration viewConfiguration, List<AdaptyPaywallProduct> products, AdaptyUiEventListener eventListener, AdaptyPaywallInsets insets)Right after receiving LocalizedViewConfiguration, you can create the corresponding AdaptyPaywallView to display it afterwards. final static AdaptyPaywallViewgetPaywallView(Activity activity, AdaptyUI.LocalizedViewConfiguration viewConfiguration, List<AdaptyPaywallProduct> products, AdaptyUiEventListener eventListener)Right after receiving LocalizedViewConfiguration, you can create the corresponding AdaptyPaywallView to display it afterwards. final static AdaptyOnboardingViewgetOnboardingView(Activity activity, AdaptyOnboardingConfiguration viewConfig, AdaptyOnboardingEventListener eventListener, Boolean safeAreaPaddings)final static AdaptyOnboardingViewgetOnboardingView(Activity activity, AdaptyOnboardingConfiguration viewConfig, AdaptyOnboardingEventListener eventListener)final static UnitgetViewConfiguration(AdaptyPaywall paywall, TimeInterval loadTimeout, ResultCallback<AdaptyUI.LocalizedViewConfiguration> callback)If you are using the Paywall Builder, you can use this method to get a configuration object for your paywall. final static UnitgetViewConfiguration(AdaptyPaywall paywall, ResultCallback<AdaptyUI.LocalizedViewConfiguration> callback)If you are using the Paywall Builder, you can use this method to get a configuration object for your paywall. final static AdaptyOnboardingConfigurationgetOnboardingConfiguration(AdaptyOnboarding onboarding)final static UnitconfigureMediaCache(AdaptyUI.MediaCacheConfiguration config)final static UnitclearMediaCache(AdaptyUI.ClearCacheStrategy strategy)-
-
Method Detail
-
getPaywallView
final static AdaptyPaywallView getPaywallView(Activity activity, AdaptyUI.LocalizedViewConfiguration viewConfiguration, List<AdaptyPaywallProduct> products, AdaptyUiEventListener eventListener, AdaptyPaywallInsets insets, AdaptyUiPersonalizedOfferResolver personalizedOfferResolver, AdaptyCustomAssets customAssets, AdaptyUiTagResolver tagResolver, AdaptyUiTimerResolver timerResolver, AdaptyUiObserverModeHandler observerModeHandler)
Right after receiving LocalizedViewConfiguration, you can create the corresponding AdaptyPaywallView to display it afterwards.
This method should be called only on UI thread.
- Parameters:
activity- An Activity instance.viewConfiguration- A LocalizedViewConfiguration object containing information about the visual part of the paywall.products- Optional AdaptyPaywallProduct list.eventListener- An object that implements the AdaptyUiEventListener interface.insets- You can override the default window inset handling by specifying the AdaptyPaywallInsets.personalizedOfferResolver- In case you want to indicate whether the price is personalized (read more), you can implement AdaptyUiPersonalizedOfferResolver and pass your own logic that maps AdaptyPaywallProduct totrue, if the price of the product is personalized, otherwisefalse.customAssets- If you are going to use custom assets functionality, pass AdaptyCustomAssets here.tagResolver- If you are going to use custom tags functionality, pass the resolver function here.timerResolver- If you are going to use custom timer functionality, pass the resolver function here.observerModeHandler- If you use Adapty in Observer mode, pass the AdaptyUiObserverModeHandler implementation to handle purchases on your own.
-
getPaywallView
final static AdaptyPaywallView getPaywallView(Activity activity, AdaptyUI.LocalizedViewConfiguration viewConfiguration, List<AdaptyPaywallProduct> products, AdaptyUiEventListener eventListener, AdaptyPaywallInsets insets, AdaptyUiPersonalizedOfferResolver personalizedOfferResolver, AdaptyCustomAssets customAssets, AdaptyUiTagResolver tagResolver, AdaptyUiTimerResolver timerResolver)
Right after receiving LocalizedViewConfiguration, you can create the corresponding AdaptyPaywallView to display it afterwards.
This method should be called only on UI thread.
- Parameters:
activity- An Activity instance.viewConfiguration- A LocalizedViewConfiguration object containing information about the visual part of the paywall.products- Optional AdaptyPaywallProduct list.eventListener- An object that implements the AdaptyUiEventListener interface.insets- You can override the default window inset handling by specifying the AdaptyPaywallInsets.personalizedOfferResolver- In case you want to indicate whether the price is personalized (read more), you can implement AdaptyUiPersonalizedOfferResolver and pass your own logic that maps AdaptyPaywallProduct totrue, if the price of the product is personalized, otherwisefalse.customAssets- If you are going to use custom assets functionality, pass AdaptyCustomAssets here.tagResolver- If you are going to use custom tags functionality, pass the resolver function here.timerResolver- If you are going to use custom timer functionality, pass the resolver function here.
-
getPaywallView
final static AdaptyPaywallView getPaywallView(Activity activity, AdaptyUI.LocalizedViewConfiguration viewConfiguration, List<AdaptyPaywallProduct> products, AdaptyUiEventListener eventListener, AdaptyPaywallInsets insets, AdaptyUiPersonalizedOfferResolver personalizedOfferResolver, AdaptyCustomAssets customAssets, AdaptyUiTagResolver tagResolver)
Right after receiving LocalizedViewConfiguration, you can create the corresponding AdaptyPaywallView to display it afterwards.
This method should be called only on UI thread.
- Parameters:
activity- An Activity instance.viewConfiguration- A LocalizedViewConfiguration object containing information about the visual part of the paywall.products- Optional AdaptyPaywallProduct list.eventListener- An object that implements the AdaptyUiEventListener interface.insets- You can override the default window inset handling by specifying the AdaptyPaywallInsets.personalizedOfferResolver- In case you want to indicate whether the price is personalized (read more), you can implement AdaptyUiPersonalizedOfferResolver and pass your own logic that maps AdaptyPaywallProduct totrue, if the price of the product is personalized, otherwisefalse.customAssets- If you are going to use custom assets functionality, pass AdaptyCustomAssets here.tagResolver- If you are going to use custom tags functionality, pass the resolver function here.
-
getPaywallView
final static AdaptyPaywallView getPaywallView(Activity activity, AdaptyUI.LocalizedViewConfiguration viewConfiguration, List<AdaptyPaywallProduct> products, AdaptyUiEventListener eventListener, AdaptyPaywallInsets insets, AdaptyUiPersonalizedOfferResolver personalizedOfferResolver, AdaptyCustomAssets customAssets)
Right after receiving LocalizedViewConfiguration, you can create the corresponding AdaptyPaywallView to display it afterwards.
This method should be called only on UI thread.
- Parameters:
activity- An Activity instance.viewConfiguration- A LocalizedViewConfiguration object containing information about the visual part of the paywall.products- Optional AdaptyPaywallProduct list.eventListener- An object that implements the AdaptyUiEventListener interface.insets- You can override the default window inset handling by specifying the AdaptyPaywallInsets.personalizedOfferResolver- In case you want to indicate whether the price is personalized (read more), you can implement AdaptyUiPersonalizedOfferResolver and pass your own logic that maps AdaptyPaywallProduct totrue, if the price of the product is personalized, otherwisefalse.customAssets- If you are going to use custom assets functionality, pass AdaptyCustomAssets here.
-
getPaywallView
final static AdaptyPaywallView getPaywallView(Activity activity, AdaptyUI.LocalizedViewConfiguration viewConfiguration, List<AdaptyPaywallProduct> products, AdaptyUiEventListener eventListener, AdaptyPaywallInsets insets, AdaptyUiPersonalizedOfferResolver personalizedOfferResolver)
Right after receiving LocalizedViewConfiguration, you can create the corresponding AdaptyPaywallView to display it afterwards.
This method should be called only on UI thread.
- Parameters:
activity- An Activity instance.viewConfiguration- A LocalizedViewConfiguration object containing information about the visual part of the paywall.products- Optional AdaptyPaywallProduct list.eventListener- An object that implements the AdaptyUiEventListener interface.insets- You can override the default window inset handling by specifying the AdaptyPaywallInsets.personalizedOfferResolver- In case you want to indicate whether the price is personalized (read more), you can implement AdaptyUiPersonalizedOfferResolver and pass your own logic that maps AdaptyPaywallProduct totrue, if the price of the product is personalized, otherwisefalse.
-
getPaywallView
final static AdaptyPaywallView getPaywallView(Activity activity, AdaptyUI.LocalizedViewConfiguration viewConfiguration, List<AdaptyPaywallProduct> products, AdaptyUiEventListener eventListener, AdaptyPaywallInsets insets)
Right after receiving LocalizedViewConfiguration, you can create the corresponding AdaptyPaywallView to display it afterwards.
This method should be called only on UI thread.
- Parameters:
activity- An Activity instance.viewConfiguration- A LocalizedViewConfiguration object containing information about the visual part of the paywall.products- Optional AdaptyPaywallProduct list.eventListener- An object that implements the AdaptyUiEventListener interface.insets- You can override the default window inset handling by specifying the AdaptyPaywallInsets.
-
getPaywallView
final static AdaptyPaywallView getPaywallView(Activity activity, AdaptyUI.LocalizedViewConfiguration viewConfiguration, List<AdaptyPaywallProduct> products, AdaptyUiEventListener eventListener)
Right after receiving LocalizedViewConfiguration, you can create the corresponding AdaptyPaywallView to display it afterwards.
This method should be called only on UI thread.
- Parameters:
activity- An Activity instance.viewConfiguration- A LocalizedViewConfiguration object containing information about the visual part of the paywall.products- Optional AdaptyPaywallProduct list.eventListener- An object that implements the AdaptyUiEventListener interface.
-
getOnboardingView
final static AdaptyOnboardingView getOnboardingView(Activity activity, AdaptyOnboardingConfiguration viewConfig, AdaptyOnboardingEventListener eventListener, Boolean safeAreaPaddings)
-
getOnboardingView
final static AdaptyOnboardingView getOnboardingView(Activity activity, AdaptyOnboardingConfiguration viewConfig, AdaptyOnboardingEventListener eventListener)
-
getViewConfiguration
final static Unit getViewConfiguration(AdaptyPaywall paywall, TimeInterval loadTimeout, ResultCallback<AdaptyUI.LocalizedViewConfiguration> callback)
If you are using the Paywall Builder, you can use this method to get a configuration object for your paywall.
Should not be called before Adapty.activate
- Parameters:
paywall- The AdaptyPaywall for which you want to get a configuration.loadTimeout- This value limits the timeout for this method.callback- A result containing the LocalizedViewConfiguration object.
-
getViewConfiguration
final static Unit getViewConfiguration(AdaptyPaywall paywall, ResultCallback<AdaptyUI.LocalizedViewConfiguration> callback)
If you are using the Paywall Builder, you can use this method to get a configuration object for your paywall.
Should not be called before Adapty.activate
- Parameters:
paywall- The AdaptyPaywall for which you want to get a configuration.callback- A result containing the LocalizedViewConfiguration object.
-
getOnboardingConfiguration
final static AdaptyOnboardingConfiguration getOnboardingConfiguration(AdaptyOnboarding onboarding)
-
configureMediaCache
final static Unit configureMediaCache(AdaptyUI.MediaCacheConfiguration config)
-
clearMediaCache
final static Unit clearMediaCache(AdaptyUI.ClearCacheStrategy strategy)
-
-
-
-