-
public final class Axeptio
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classAxeptio.Companionpublic classAxeptio.Errorpublic final classAxeptio.ConsentConsents
public interfaceAxeptio.CompletionHandler
-
Field Summary
-
Method Summary
Modifier and Type Method Description final StringgetToken()final UnitsetToken(String token)final BooleangetIsInitialized()final IntegergetMainColor()final UnitsetMainColor(Integer mainColor)final IntegergetSecondaryColor()final UnitsetSecondaryColor(Integer secondaryColor)final IntegergetTertiaryColor()final UnitsetTertiaryColor(Integer tertiaryColor)final IntegergetDangerColor()final UnitsetDangerColor(Integer dangerColor)final IntegergetTextColor()final UnitsetTextColor(Integer textColor)final IntegergetTitleColor()final UnitsetTitleColor(Integer titleColor)final IntegergetCardColor()final UnitsetCardColor(Integer cardColor)final IntegergetWidgetColor()final UnitsetWidgetColor(Integer widgetColor)final IntegergetToggleOffColor()final UnitsetToggleOffColor(Integer toggleOffColor)final IntegergetButtonTextColor()final UnitsetButtonTextColor(Integer buttonTextColor)final IntegergetButtonHighlightedTextColor()final UnitsetButtonHighlightedTextColor(Integer buttonHighlightedTextColor)final IntegergetButtonBorderColor()final UnitsetButtonBorderColor(Integer buttonBorderColor)final IntegergetButtonBackgroundColor()final UnitsetButtonBackgroundColor(Integer buttonBackgroundColor)final IntegergetButtonHighlightedBackgroundColor()final UnitsetButtonHighlightedBackgroundColor(Integer buttonHighlightedBackgroundColor)final IntegergetPrimaryButtonTextColor()final UnitsetPrimaryButtonTextColor(Integer primaryButtonTextColor)final IntegergetPrimaryButtonHighlightedTextColor()final UnitsetPrimaryButtonHighlightedTextColor(Integer primaryButtonHighlightedTextColor)final IntegergetPrimaryButtonBorderColor()final UnitsetPrimaryButtonBorderColor(Integer primaryButtonBorderColor)final IntegergetPrimaryButtonBackgroundColor()final UnitsetPrimaryButtonBackgroundColor(Integer primaryButtonBackgroundColor)final IntegergetPrimaryButtonHighlightedBackgroundColor()final UnitsetPrimaryButtonHighlightedBackgroundColor(Integer primaryButtonHighlightedBackgroundColor)final Function2<Context, Font.Weight, Typeface>getTitleFontProvider()final UnitsetTitleFontProvider(Function2<Context, Font.Weight, Typeface> titleFontProvider)final Function2<Context, Font.Weight, Typeface>getTextFontProvider()final UnitsetTextFontProvider(Function2<Context, Font.Weight, Typeface> textFontProvider)final IntegergetCornerRadius()final UnitsetCornerRadius(Integer cornerRadius)final IntegergetPadding()final UnitsetPadding(Integer padding)final Client.OverlayStyle.BackdropStylegetBackdropStyle()final UnitsetBackdropStyle(Client.OverlayStyle.BackdropStyle backdropStyle)final IntegergetBackdropInnerColor()final UnitsetBackdropInnerColor(Integer backdropInnerColor)final IntegergetBackdropOuterColor()final UnitsetBackdropOuterColor(Integer backdropOuterColor)final FloatgetBackdropOpacity()final UnitsetBackdropOpacity(Float backdropOpacity)final ContextgetContext()final Unitinitialize(String clientId, String version, Axeptio.CompletionHandler completionHandler)Initializes the SDK by fetching the configuration and calling the completion handler when done. final BooleangetUserConsent(String vendorName)Returns an optional boolean indicating if the user has made his choice for given vendor and whether or not he gave his consent. final UnitsetUserConsent(Boolean value, String vendorName)final UnitclearUserConsents()final Function0<Unit>showConsentView(Integer initialStepIndex, Boolean onlyFirstTime, Boolean singleTop, View view, Boolean animated, Axeptio.CompletionHandler completionHandler)Shows Axeptio's widget to the user in a given Viewand calls the completion handler when the user has made his choices.final Function0<Unit>showConsentView(Integer initialStepIndex, Boolean onlyFirstTime, Boolean singleTop, View view, Axeptio.CompletionHandler completionHandler)Shows Axeptio's widget to the user in a given Viewand calls the completion handler when the user has made his choices.final Function0<Unit>showConsentView(Integer initialStepIndex, Boolean onlyFirstTime, View view, Axeptio.CompletionHandler completionHandler)Shows Axeptio's widget to the user in a given Viewand calls the completion handler when the user has made his choices.final Function0<Unit>showConsentView(Integer initialStepIndex, View view, Axeptio.CompletionHandler completionHandler)Shows Axeptio's widget to the user in a given Viewand calls the completion handler when the user has made his choices.final Function0<Unit>showConsentView(View view, Axeptio.CompletionHandler completionHandler)Shows Axeptio's widget to the user in a given Viewand calls the completion handler when the user has made his choices.final Unitrerere(String clientId, String version, Axeptio.CompletionHandler completionHandler)Initializes the SDK by fetching the configuration and calling the completion handler when done. -
-
Constructor Detail
-
Axeptio
Axeptio(Context context)
-
-
Method Detail
-
getIsInitialized
final Boolean getIsInitialized()
-
getMainColor
final Integer getMainColor()
-
setMainColor
final Unit setMainColor(Integer mainColor)
-
getSecondaryColor
final Integer getSecondaryColor()
-
setSecondaryColor
final Unit setSecondaryColor(Integer secondaryColor)
-
getTertiaryColor
final Integer getTertiaryColor()
-
setTertiaryColor
final Unit setTertiaryColor(Integer tertiaryColor)
-
getDangerColor
final Integer getDangerColor()
-
setDangerColor
final Unit setDangerColor(Integer dangerColor)
-
getTextColor
final Integer getTextColor()
-
setTextColor
final Unit setTextColor(Integer textColor)
-
getTitleColor
final Integer getTitleColor()
-
setTitleColor
final Unit setTitleColor(Integer titleColor)
-
getCardColor
final Integer getCardColor()
-
setCardColor
final Unit setCardColor(Integer cardColor)
-
getWidgetColor
final Integer getWidgetColor()
-
setWidgetColor
final Unit setWidgetColor(Integer widgetColor)
-
getToggleOffColor
final Integer getToggleOffColor()
-
setToggleOffColor
final Unit setToggleOffColor(Integer toggleOffColor)
-
getButtonTextColor
final Integer getButtonTextColor()
-
setButtonTextColor
final Unit setButtonTextColor(Integer buttonTextColor)
-
getButtonHighlightedTextColor
final Integer getButtonHighlightedTextColor()
-
setButtonHighlightedTextColor
final Unit setButtonHighlightedTextColor(Integer buttonHighlightedTextColor)
-
getButtonBorderColor
final Integer getButtonBorderColor()
-
setButtonBorderColor
final Unit setButtonBorderColor(Integer buttonBorderColor)
-
getButtonBackgroundColor
final Integer getButtonBackgroundColor()
-
setButtonBackgroundColor
final Unit setButtonBackgroundColor(Integer buttonBackgroundColor)
-
getButtonHighlightedBackgroundColor
final Integer getButtonHighlightedBackgroundColor()
-
setButtonHighlightedBackgroundColor
final Unit setButtonHighlightedBackgroundColor(Integer buttonHighlightedBackgroundColor)
-
getPrimaryButtonTextColor
final Integer getPrimaryButtonTextColor()
-
setPrimaryButtonTextColor
final Unit setPrimaryButtonTextColor(Integer primaryButtonTextColor)
-
getPrimaryButtonHighlightedTextColor
final Integer getPrimaryButtonHighlightedTextColor()
-
setPrimaryButtonHighlightedTextColor
final Unit setPrimaryButtonHighlightedTextColor(Integer primaryButtonHighlightedTextColor)
-
getPrimaryButtonBorderColor
final Integer getPrimaryButtonBorderColor()
-
setPrimaryButtonBorderColor
final Unit setPrimaryButtonBorderColor(Integer primaryButtonBorderColor)
-
getPrimaryButtonBackgroundColor
final Integer getPrimaryButtonBackgroundColor()
-
setPrimaryButtonBackgroundColor
final Unit setPrimaryButtonBackgroundColor(Integer primaryButtonBackgroundColor)
-
getPrimaryButtonHighlightedBackgroundColor
final Integer getPrimaryButtonHighlightedBackgroundColor()
-
setPrimaryButtonHighlightedBackgroundColor
final Unit setPrimaryButtonHighlightedBackgroundColor(Integer primaryButtonHighlightedBackgroundColor)
-
getTitleFontProvider
final Function2<Context, Font.Weight, Typeface> getTitleFontProvider()
-
setTitleFontProvider
final Unit setTitleFontProvider(Function2<Context, Font.Weight, Typeface> titleFontProvider)
-
getTextFontProvider
final Function2<Context, Font.Weight, Typeface> getTextFontProvider()
-
setTextFontProvider
final Unit setTextFontProvider(Function2<Context, Font.Weight, Typeface> textFontProvider)
-
getCornerRadius
final Integer getCornerRadius()
-
setCornerRadius
final Unit setCornerRadius(Integer cornerRadius)
-
getPadding
final Integer getPadding()
-
setPadding
final Unit setPadding(Integer padding)
-
getBackdropStyle
final Client.OverlayStyle.BackdropStyle getBackdropStyle()
-
setBackdropStyle
final Unit setBackdropStyle(Client.OverlayStyle.BackdropStyle backdropStyle)
-
getBackdropInnerColor
final Integer getBackdropInnerColor()
-
setBackdropInnerColor
final Unit setBackdropInnerColor(Integer backdropInnerColor)
-
getBackdropOuterColor
final Integer getBackdropOuterColor()
-
setBackdropOuterColor
final Unit setBackdropOuterColor(Integer backdropOuterColor)
-
getBackdropOpacity
final Float getBackdropOpacity()
-
setBackdropOpacity
final Unit setBackdropOpacity(Float backdropOpacity)
-
getContext
final Context getContext()
-
initialize
final Unit initialize(String clientId, String version, Axeptio.CompletionHandler completionHandler)
Initializes the SDK by fetching the configuration and calling the completion handler when done. If it fails (because of network for example) it is OK to call the
initializefunction again.
-
getUserConsent
final Boolean getUserConsent(String vendorName)
Returns an optional boolean indicating if the user has made his choice for given vendor and whether or not he gave his consent. If the returned value is
nullit either means the vendor was not present in the configuration or the widget has not been presented to the user yet.
-
setUserConsent
final Unit setUserConsent(Boolean value, String vendorName)
-
clearUserConsents
final Unit clearUserConsents()
-
showConsentView
@JvmOverloads() final Function0<Unit> showConsentView(Integer initialStepIndex, Boolean onlyFirstTime, Boolean singleTop, View view, Boolean animated, Axeptio.CompletionHandler completionHandler)
Shows Axeptio's widget to the user in a given
Viewand calls the completion handler when the user has made his choices. IfonlyFirstTimeis true and the user has already made his choices in a previous call the widget is not shown and the completion is called immediately. However if the configuration includes new vendors then the widget is shown again. You can specify aninitialStepIndexgreater than 0 to show a different step directly.Axeptio will try and find a parent view to hold Axeptio Widget from the value given to view. Axeptio will walk up the view tree trying to find a suitable parent, which is defined as a
CoordinatorLayoutor the window decor's content view, whichever comes first. Having aCoordinatorLayoutin your view hierarchy allows Axeptio to enable certain features.- Parameters:
view- The view to find a parent from.
-
showConsentView
@JvmOverloads() final Function0<Unit> showConsentView(Integer initialStepIndex, Boolean onlyFirstTime, Boolean singleTop, View view, Axeptio.CompletionHandler completionHandler)
Shows Axeptio's widget to the user in a given
Viewand calls the completion handler when the user has made his choices. IfonlyFirstTimeis true and the user has already made his choices in a previous call the widget is not shown and the completion is called immediately. However if the configuration includes new vendors then the widget is shown again. You can specify aninitialStepIndexgreater than 0 to show a different step directly.Axeptio will try and find a parent view to hold Axeptio Widget from the value given to view. Axeptio will walk up the view tree trying to find a suitable parent, which is defined as a
CoordinatorLayoutor the window decor's content view, whichever comes first. Having aCoordinatorLayoutin your view hierarchy allows Axeptio to enable certain features.- Parameters:
view- The view to find a parent from.
-
showConsentView
@JvmOverloads() final Function0<Unit> showConsentView(Integer initialStepIndex, Boolean onlyFirstTime, View view, Axeptio.CompletionHandler completionHandler)
Shows Axeptio's widget to the user in a given
Viewand calls the completion handler when the user has made his choices. IfonlyFirstTimeis true and the user has already made his choices in a previous call the widget is not shown and the completion is called immediately. However if the configuration includes new vendors then the widget is shown again. You can specify aninitialStepIndexgreater than 0 to show a different step directly.Axeptio will try and find a parent view to hold Axeptio Widget from the value given to view. Axeptio will walk up the view tree trying to find a suitable parent, which is defined as a
CoordinatorLayoutor the window decor's content view, whichever comes first. Having aCoordinatorLayoutin your view hierarchy allows Axeptio to enable certain features.- Parameters:
view- The view to find a parent from.
-
showConsentView
@JvmOverloads() final Function0<Unit> showConsentView(Integer initialStepIndex, View view, Axeptio.CompletionHandler completionHandler)
Shows Axeptio's widget to the user in a given
Viewand calls the completion handler when the user has made his choices. IfonlyFirstTimeis true and the user has already made his choices in a previous call the widget is not shown and the completion is called immediately. However if the configuration includes new vendors then the widget is shown again. You can specify aninitialStepIndexgreater than 0 to show a different step directly.Axeptio will try and find a parent view to hold Axeptio Widget from the value given to view. Axeptio will walk up the view tree trying to find a suitable parent, which is defined as a
CoordinatorLayoutor the window decor's content view, whichever comes first. Having aCoordinatorLayoutin your view hierarchy allows Axeptio to enable certain features.- Parameters:
view- The view to find a parent from.
-
showConsentView
@JvmOverloads() final Function0<Unit> showConsentView(View view, Axeptio.CompletionHandler completionHandler)
Shows Axeptio's widget to the user in a given
Viewand calls the completion handler when the user has made his choices. IfonlyFirstTimeis true and the user has already made his choices in a previous call the widget is not shown and the completion is called immediately. However if the configuration includes new vendors then the widget is shown again. You can specify aninitialStepIndexgreater than 0 to show a different step directly.Axeptio will try and find a parent view to hold Axeptio Widget from the value given to view. Axeptio will walk up the view tree trying to find a suitable parent, which is defined as a
CoordinatorLayoutor the window decor's content view, whichever comes first. Having aCoordinatorLayoutin your view hierarchy allows Axeptio to enable certain features.- Parameters:
view- The view to find a parent from.
-
rerere
final Unit rerere(String clientId, String version, Axeptio.CompletionHandler completionHandler)
Initializes the SDK by fetching the configuration and calling the completion handler when done. If it fails (because of network for example) it is OK to call the
initializefunction again.
-
-
-
-