Premium Android SDK

Version: 1.5.0
Min Android SDK: 30
Theme: light, dark
Orientations: portrait, landscape
Languages: en, ru, kk
Configure dependency
To get the dependency, you first need to configure access to our repository.
Install AWS CLI using this guide.
Configure AWS CLI using the credentials provided by us. To do this, run the following command in your terminal.
Add this configuration into the
repositoriesblock in your project'sbuild.gradle|settings.gradlefile.
Add the dependency on the SDK to the project's
build.gradlefile in thedependenciesblock.
The SDK uses some Java 8 APIs that are not available in Android SDK 24, so to enable devices with lower Android versions to u SDKse the, desugaring must be enabled. More detaist can be found here https://developer.android.com/studio/write/java8-support#library-desugaring
Auth
The SDK is available only to authenticated users.
To start the authorization process, you need to implement the functional interface com.visa.concierge.auth.CredentialsProvider. The output of the implementation method of this interface should be a class implementing the interface com.visa.concierge.auth.Credentials. Currently, only one authentication method is available - using the client token. To obtain this token, your backend must have the appropriate API. In the implementation of the functional interface, you need to implement the logic for retrieving this token from your backend and passing it to the SDK in the appropriate format. To provide this token, you need to use the class com.visa.concierge.auth.ClientCredentials.
com.visa.concierge.auth.ClientCredentials has 2 parameters in the constructor:
token- user tokenneedRequestUserPhone- a flag indicating the necessity to request the user's phone number on the first SDK launch. If the flag istrue- on first launch SDK will open an activation flow to request and activate the user's phone number, iffalse- it won't (by default, in the constructor with one parameter, this flag isfalse).
Note that different client tokens are used for the two different flows (with or without requesting the user's phone number).
Without requesting the phone number, the token obtained from /sdk/v1/user/getToken is used.
With requesting the phone number, the token obtained from /sdk/v1/user/getTokenById is used.
To reduce requests to your backend, the SDK caches the client token in the application memory(RAM), and in EncryptedSharedPreferences, relying on its expiration time.
EncryptedSharedPreferences are encrypted with a unique device-bound key, so they need to be excluded from automatic backups. To do this, you need to:
In your AndroidManifest.xml file add attributes.
Create an XML file called
backup_rules.xmlin theres/xml/directory with following content.Create an XML file called
data_extraction_rules.xmlin theres/xml/directory with following content.
Setup and Init SDK
Sdk must be initialized before the first usage of UI components. This could be done in the Application class of your app.
Example of initialization
Configuration and Theming
All configuration and theme settings of the SDK are done using com.visa.concierge.ConciergeConfig.Builder. All themes are divided into two parts - dark and light. Switching between them occurs automatically following the dark-light mode of the operating system.
The tint of elements with dynamic colors is set using com.visa.concierge.ui.theme.TintStateList. This class has static methods that allow you to set the color for a specific state. Currently, there are 3 states:
normal - color in the normal state
disabled - color in the disabled state
checked - color in the selected state
Each screen, element, or group of elements can have individually customized fonts. The following parameters are available for font customization:
fontFamily - class that holds a list of font families
fontSize - font size
fontWeight - font weight from the specified family
lineHeight - paragraph height
letterSpacing - spacing between characters
Tip.
Since typically one font family with different weights is used throughout the application, you can create a constant with com.visa.concierge.ui.theme.FontFamily and pass it to all design elements. The appropriate font from the family will be selected based on the fontWeight from the theme.
Language Handling Notice.
The SDK does not provide any public API for setting the language manually.
It fully relies on Android’s standard localization mechanism and automatically adapts to the system language or the application language defined by the app’s Context.
If your app supports language switching through the standard Android Context methods, the SDK will follow it automatically.
However, if your app uses a custom localization system that bypasses Android’s standard behavior, you must also update the locale using the official Android approach (by applying the locale through the application Context) to ensure the SDK is properly localized.
Theme elements
isDebugEnabled
enable/disable console logging
backgroundTheme
global screen background theme
topBarTheme
toolbar theme
navBarTheme
navigation bar theme
inputTheme
global input theme
progressIndicatorTheme
global progress indicator theme
ratingBarTheme
global rating bar theme
textTheme
global text theme
rippleTheme
global ripple theme
cardTheme
global card component theme
filledTextButtonTheme
global filled text button theme
outlinedTextButtonTheme
global outlined text button theme
filledIconButtonTheme
global filled icon button theme
infoDialogTheme
global info dialog theme
chatScreenTheme
chat screen theme
requestListScreenTheme
requests list screen theme
brandColors
brand colors theme (primary, secondary, tertiary, etc.)
benefitsTheme
benefits screen theme
stepIndicatorTheme
step indicator theme
statusBadgeTheme
status badge theme
floatingButtonTheme
floating button theme
infoDoubleActionDialogTheme
double action dialog theme
appButtonTheme
global app button theme
Background theme
color
background color
TopBar theme
backgroundColor
background color
buttonTint
button tint color
NavigationBar theme
backgroundColor
background color
buttonTint
button tint color
indicatorColor
accent background color of selected icon
Input theme
cursorColor
cursor color
textHighlight
selected text highlight color
ProgressIndicator theme
color
indicator background color
trackColor
indicator track color
StepIndicator theme
stepTint
step color tint
doneIconColor
color of done icon for last step
RatingBar theme
selectedColor
color that represents the selected or "filled" part of the rating
unselectedColor
color that represents the unselected or "empty" part of the rating
Text theme
color
text color
Ripple theme
color
ripple color
alpha
ripple alpha
Card theme
backgroundColor
background color
contentColor
content color
Button theme
backgroundTint
background color
contentTint
content color
SingleActionDialog theme
backgroundColor
background color
confirmButtonTheme
confirm button theme
ChatScreen theme
infoScreenTheme
info screen theme
clientMessageTheme
client message theme
managerMessageTheme
manager message theme
dateSeparatorTheme
date separator theme
inputTheme
chat input theme
InfoScreen theme
logoBackground
logog background color
logoTint
logo tint color
vendorLogo
vendor logo icon resource
vendorLogoTintEnabled
enable/disable tint of vendor logo
Message theme
backgroundTint
background color
fileTheme
message file theme
textColor
text color
dateColor
date text color
avatarBackgroundTint
avatar background color
avatarContentTint
avatar content color
MessageFile theme
backgroundTint
background color
contentTint
tint of file icon/name
DateSeparator theme
backgroundTint
background color
textColor
text color
ChatInput theme
backgroundTint
background color
textTint
text color
emojiButtonTheme
emoji popup theme
sendButtonTheme
send button theme
attachButtonTheme
attach button theme
emojiPopupTheme
emoji button theme
attachDialogTheme
attach dialog theme
attachedItemTheme
attached item theme
EmojiPopup theme
backgroundTint
background color
buttonTint
button tint color
dividerTint
divider color
AttachDialog theme
backgroundTint
background color
buttonTint
button tint color
dividerTint
divider color
AttachedItem theme
backgroundTint
background color
contentTint
tint color of icon/text
cancelButtonTheme
cancell button theme
RequestListScreen theme
requestViewTheme
request card view theme
RequestView theme
backgroundColor
background color
unseenBadgeColor
unseen progress badge background color
unseenBadgeTextColor
unseen progress badge text color
titleTint
title color
dateTint
request creation date color
requestProgressTheme
request step indicator theme
BrandColors theme
primary
primary brand color
secondary
secondary brand color
tertiary
tertiary brand color
quaternary
quaternary brand color
quinary
quinary brand color
senary
senary brand color
septenary
septenary brand color
octonary
octonary brand color
nonary
nonary brand color
denary
denary brand color
eleventh
eleventh brand color
twelfth
twelfth brand color
BenefitsTheme theme
element
description
textPrimary
primary text color
textSecondary
secondary text color
foregroundTertiary
tertiary foreground color
borderPrimary
primary border color
backgroundPrimary
primary background color
backgroundSecondary
secondary background color
buttonSecondaryBackground
secondary button background color
buttonSecondaryForeground
secondary button foreground color
TopBarTheme theme
element
description
backgroundColor
toolbar background color
buttonTint
toolbar button tint color
actionBackgroundTint
action button background tint
textStyle
toolbar text style
NavBarTheme theme
element
description
backgroundColor
navigation bar background color
buttonTint
navigation bar button tint color
indicatorColor
navigation bar indicator color
textStyle
navigation bar text style
ActivationScreenTheme theme
element
description
bodyTextStyle
activation screen body text style
ChatScreenTheme theme
element
description
title
chat screen title
isMessageListReversed
reverse message list order
infoScreenTheme
info screen theme
clientMessageTheme
client message theme
managerMessageTheme
manager message theme
dateSeparatorTheme
date separator theme
inputTheme
chat input theme
InfoScreenTheme theme (nested in ChatScreenTheme)
element
description
logoBackground
logo background color
logoTint
logo tint color
vendorLogo
vendor logo drawable resource
vendorLogoTintEnabled
enable vendor logo tint
visaLogoEnabled
enable visa logo
vendorAdditionalText
vendor additional text resource
bodyTextStyle
body text style
ChatMessageTheme theme (nested in ChatScreenTheme)
element
description
backgroundTint
message background color
fileTheme
message file theme
textColor
message text color
linkColor
message link color
dateColor
message date color
avatarIcon
avatar icon drawable resource
avatarIconSize
avatar icon size
avatarBackgroundTint
avatar background color
avatarContentTint
avatar content color
textStyle
message text style
dateTextStyle
date text style
MessageFileTheme theme (nested in ChatMessageTheme)
element
description
backgroundTint
file background color
contentTint
file content color
textStyle
file text style
ChatDateSeparatorTheme theme (nested in ChatScreenTheme)
element
description
backgroundTint
date separator background color
borderColor
date separator border color
textColor
date separator text color
textStyle
date separator text style
ChatInputTheme theme (nested in ChatScreenTheme)
element
description
backgroundTint
input background color
textTint
input text tint color
emojiButtonTheme
emoji button theme
sendButtonTheme
send button theme
attachButtonTheme
attach button theme
emojiPopupTheme
emoji popup theme
attachDialogTheme
attach dialog theme
attachedItemTheme
attached item theme
textStyle
input text style
AttachedItemTheme theme (nested in ChatInputTheme)
element
description
backgroundTint
attached item background color
contentTint
attached item content color
cancelButtonTheme
cancel button theme
textStyle
attached item text style
RequestListScreenTheme theme
element
description
requestStateTheme
request state theme
requestViewTheme
request view theme
RequestStateTheme theme (nested in RequestListScreenTheme)
element
description
waitingState
waiting state theme
processingState
processing state theme
completedState
completed state theme
emptyState
empty state theme
searchEmptyState
search empty state theme
RequestStateItemTheme theme (nested in RequestStateTheme)
element
description
iconBackgroundColor
state icon background color
iconTintColor
state icon tint color
titleColor
state title color
descriptionColor
state description color
RequestViewTheme theme (nested in RequestListScreenTheme)
element
description
backgroundColor
request card background color
borderColor
request card border color
unseenBadgeColor
unseen badge background color
unseenBadgeTextColor
unseen badge text color
titleTint
request title color
dateTint
request date color
unseenBadgeTextStyle
unseen badge text style
titleTextStyle
title text style
dateTextStyle
date text style
statusBadgeTheme
status badge theme
InputTheme theme
element
description
cursorColor
input cursor color
textHighlight
input text highlight color
hintColor
input hint color
errorColor
input error color
backgroundColor
input background color
textStyle
input text style
errorTextStyle
input error text style
StepIndicatorTheme theme
element
description
stepTint
step indicator tint color
doneIconColor
done icon color
StatusBadgeTheme theme
element
description
newStatusColors
new status colors (background, border, text)
inProgressStatusColors
in progress status colors (background, border, text)
completedStatusColors
completed status colors (background, border, text)
ProgressIndicatorTheme theme
element
description
color
progress indicator color
trackColor
progress indicator track color
RatingBarTheme theme
element
description
ratingColor
active rating color
backgroundColor
inactive rating color
TextTheme theme
element
description
color
global text color
RippleTheme theme
element
description
color
ripple effect color
CardTheme theme
element
description
backgroundColor
card background color
contentColor
card content color
FilledTextButtonTheme theme
element
description
backgroundTint
filled button background tint
contentTint
filled button content tint
textStyle
filled button text style
OutlinedTextButtonTheme theme
element
description
backgroundTint
outlined button background tint
contentTint
outlined button content tint
textStyle
outlined button text style
FilledIconButtonTheme theme
element
description
backgroundTint
filled icon button background tint
contentTint
filled icon button content tint
FloatingButtonTheme theme
element
description
backgroundTint
floating button background tint
contentTint
floating button content tint
InfoDialogTheme theme
element
description
backgroundColor
dialog background color
textStyle
dialog text style
confirmButtonTheme
confirm button theme
InfoDoubleActionDialogTheme theme
element
description
backgroundColor
dialog background color
textStyle
dialog text style
confirmButtonTheme
confirm button theme
declineButtonTheme
decline button theme
AppButtonTheme theme
element
description
backgroundColor
app button background color
textColor
app button text color
cornerRadius
app button corner radius
height
app button height
textStyle
app button text style
fontWeight
app button font weight
Usage
Concierge Integration
There are 3 ways to integrate the SDK into your application:
Activity - using
com.visa.concierge.ui.ConciergeActivity. This activity needs to be registered in your application's manifest.Fragment - using
com.visa.concierge.ui.ConciergeFragment.Compose - using
com.visa.concierge.ui.ConciergeEntryPoint().
Benefits Integration
The SDK also provides separate entry points for Benefits functionality:
Benefits Only Entry Points
Fragment: com.visa.concierge.ui.BenefitsOnlyFragment
Compose: com.visa.concierge.ui.BenefitsOnlyEntryPoint()
BenefitsOnlyEntryPoint does not handle phone activation workflow automatically. Phone activation should be handled by the parent application or use ConciergeEntryPoint instead.
For any of these methods, you will only need to define the navigation from your application to the SDK's entry point, and that's it.
Last updated