Skip to content

Cards SDK for Android

The Cards SDK is a solution to ease the integration with the Alviere services.

Features

  • Card Issuance
  • Digital Wallet
  • Incentives

Requirements

  • Android Studio Hedgehog or above
  • Android 6.0 (API level 23) or above
  • Java 11+

Installation

Maven Central

1. Add Maven Central to project repositories

repositories {
    // ...
    mavenCentral()
}

2. Add SDK dependency to module's build.gradle file using the latest version.

dependencies {
    // ...
    implementation 'com.alviere.android:cards:X.Y.Z'
}

Manual

1. Get the latest version of Cards SDK provided by Alviere and add the files to your .m2 path location. Depending on your operation system, these are the default paths.

  • Windows: C:\Users\<User_Name>\.m2
  • Linux: /home/<User_Name>/.m2
  • Mac: /Users/<user_name>/.m2

2. Add a maven path to include the .m2 path location in project repositories. Add the new path before mavenCentral() to respect fetch order.

repositories {
    // ...
    maven { url "file:/path/to/repo/m2repository/" } // Or use mavenLocal() for default path.
    mavenCentral()
}

3. Add SDK dependency to module's build.gradle file using the version provided by Alviere.

dependencies {
    // ...
    implementation 'com.alviere.android:cards:X.Y.Z'
}

Java Version Support

Make sure you have enabled Java 11 language feature support. To do so, guarantee that the following configurations are on the module's build.gradle file.

android {
    // ...
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_11
        targetCompatibility JavaVersion.VERSION_11
    }
    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_11.toString()
    }
}

Usage

On your android application class, setup Alviere Initialization.

class AndroidApplication : Application() {

  override fun onCreate() {
    super.onCreate()

    Alviere.init(this)
  }
}

Card Issuance

This section describes how to issue and manage cards with the Alviere platform. To start, get the CardsSdk service interface instance or use with Dependency Injection.

private val cardsService = CardsSdk.service

Declare the callback

These callbacks are the main communication back channel to your application. For each action there is one method associated as follows. In addition to these methods, there is also an event method for handling events. Callbacks will always run on main thread.

private val createCardSdkCallback = object : CreateCardSdkCallback {
  override fun onSuccess(issuedCardDetails: IssuedCardDetailsModel) { /* handle success */ }

  override fun onEvent(event: String, metadata: Map<String, String>?) { /* handle event */ }
}

private val listCardsSdkCallback = object : ListCardsSdkCallback {
  override fun onSuccess(issuedCards: List<IssuedCardDetailsModel>) { /* handle success */ }

  override fun onEvent(event: String, metadata: Map<String, String>?) { /* handle event */ }
}

private val getCardSdkCallback = object : GetCardSdkCallback {
  override fun onSuccess(issuedCardDetails: IssuedCardDetailsModel) { /* handle success */ }

  override fun onEvent(event: String, metadata: Map<String, String>?) { /* handle event */ }
}

private val getCardImageSdkCallback = object : GetCardImageSdkCallback {
  override fun onSuccess(issuedCardImage: Bitmap) { /* handle success */ }

  override fun onEvent(event: String, metadata: Map<String, String>?) { /* handle event */ }
}

private val getCardSensitiveDataSdkCallback = object : GetCardSensitiveDataSdkCallback {
  override fun onSuccess(issuedCardSensitiveData: CardSensitiveDataModel) { /* handle success */ }

  override fun onEvent(event: String, metadata: Map<String, String>?) { /* handle event */ }
}

private val updateCardSdkCallback = object : UpdateCardSdkCallback {
  override fun onSuccess(issuedCardDetails: IssuedCardDetailsModel) { /* handle success */ }

  override fun onEvent(event: String, metadata: Map<String, String>?) { /* handle event */ }
}

private val activateCardSdkCallback = object : ActivateCardSdkCallback {
  override fun onSuccess() { /* handle success */ }

  override fun onEvent(event: String, metadata: Map<String, String>?) { /* handle event */ }
}

private val freezeCardSdkCallback = object : FreezeCardSdkCallback {
  override fun onSuccess() { /* handle success */ }

  override fun onEvent(event: String, metadata: Map<String, String>?) { /* handle event */ }
}

private val unfreezeCardSdkCallback = object : UnfreezeCardSdkCallback {
  override fun onSuccess() { /* handle success */ }

  override fun onEvent(event: String, metadata: Map<String, String>?) { /* handle event */ }
}

private val cancelCardSdkCallback = object : CancelCardSdkCallback {
  override fun onSuccess() { /* handle success */ }

  override fun onEvent(event: String, metadata: Map<String, String>?) { /* handle event */ }
}

private val setCardPinSdkCallback = object : SetCardPinSdkCallback {
  override fun onSuccess() { /* handle success */ }

  override fun onEvent(event: String, metadata: Map<String, String>?) { /* handle event */ }
}

onSuccess

This callback method is called when a request was successfully executed. Use this to issue and manage cards of a user's wallet with the Alviere API.

onEvent

This callback method is called when the user exited from the Cards SDK, when an error occurred, or when certain events in the Cards SDK flow have occurred. This allows your application to get more information about what is going on as the user goes through the Cards SDK flow. In case of an error, you may want to display information related to the error to the user and have them try doing the action again.

Create Card

To create a new issued card, use the Cards SDK service method cardsService.createCard. Pass the session_token, the wallet_uuid, the IssueCardRequest model and the CreateCardSdkCallback.

val model = IssueCardRequest(...)
cardsService.createCard(
    sessionToken = session_token,
    walletUuid = wallet_uuid,
    data = model,
    clientCallback = createCardSdkCallback
)

The result of this action will return the newly created IssuedCardDetailsModel on onSuccess(issuedCardDetails: IssuedCardDetailsModel) and any errors will be returned on onEvent(event: String, metadata: Map<String, String>?), both from the callback.

Create Non-Reloadable Prepaid Card

To create a new non-reloadable prepaid card, use the Cards SDK service method cardsService.createNonReloadablePrepaidCard. Pass the session_token, the account_uuid, the NonReloadablePrepaidCardRequest model and the CreateCardSdkCallback.

val model = NonReloadablePrepaidCardRequest(...)
cardsService.createCard(
    sessionToken = session_token,
    accountUuid = account_uuid,
    data = model,
    clientCallback = createCardSdkCallback
)

The result of this action will return the newly created IssuedCardDetailsModel on onSuccess(issuedCardDetails: IssuedCardDetailsModel) and any errors will be returned on onEvent(event: String, metadata: Map<String, String>?), both from the callback.

List Cards

To get a list of cards from a wallet, use the Cards SDK service method cardsService.listCards. Pass the session_token, the wallet_uuid, the ListCardsSdkCallback and the limit/offset, optionally.

cardsService.listCards(
    sessionToken = session_token,
    walletUuid = wallet_uuid,
    clientCallback = listCardsSdkCallback
)

The result of this action will return the user's wallet cards List<IssuedCardDetailsModel> on onSuccess(issuedCards: List<IssuedCardDetailsModel>) and any errors will be returned on onEvent(event: String, metadata: Map<String, String>?), both from the callback.

Get Card

To get a card, use the Cards SDK service method cardsService.getCard. Pass the session_token, the wallet_uuid, the card_uuid and the GetCardSdkCallback.

cardsService.getCard(
    sessionToken = session_token,
    walletUuid = wallet_uuid,
    cardUuid = card_uuid,
    clientCallback = getCardSdkCallback
)

The result of this action will return the issued card of a wallet IssuedCardDetailsModel on onSuccess(issuedCardDetails: IssuedCardDetailsModel) and any errors will be returned on onEvent(event: String, metadata: Map<String, String>?), both from the callback.

Get Card Image

To get a card image, use the Cards SDK service method cardsService.getCardImage. Pass the session_token, the wallet_uuid, the card_uuid and the GetCardImageSdkCallback.

cardsService.getCardImage(
    sessionToken = session_token,
    walletUuid = wallet_uuid,
    cardUuid = card_uuid,
    clientCallback = getCardImageSdkCallback
)

The result of this action will return the issued card image Android Bitmap on onSuccess(issuedCardImage: Bitmap) and any errors will be returned on onEvent(event: String, metadata: Map<String, String>?), both from the callback.

Get Card Sensitive Data

To get a card sensitive data, use the Cards SDK service method cardsService.getCardSensitiveData. Pass the session_token, the wallet_uuid, the card_uuid and the GetCardSensitiveDataSdkCallback.

cardsService.getCardSensitiveData(
    sessionToken = session_token,
    walletUuid = wallet_uuid,
    cardUuid = card_uuid,
    clientCallback = getCardSensitiveDataSdkCallback
)

The result of this action will return the issued card sensitive data IssuedCardSensitiveDataModel on onSuccess(issuedCardSensitiveData: CardSensitiveDataModel) and any errors will be returned on onEvent(event: String, metadata: Map<String, String>?), both from the callback.

Update Card

To update a card, use the Cards SDK service method cardsService.updateCard. Pass the session_token, the wallet_uuid, the card_uuid, the CardUpdateRequest model and the UpdateCardSdkCallback.

val model = CardUpdateRequest(...)
cardsService.updateCard(
    sessionToken = session_token,
    walletUuid = wallet_uuid,
    cardUuid = card_uuid,
    data = model,
    clientCallback = updateCardSdkCallback
)

The result of this action will return the updated card IssuedCardDetailsModel on onSuccess(issuedCardDetails: IssuedCardDetailsModel) and any errors will be returned on onEvent(event: String, metadata: Map<String, String>?), both from the callback.

Activate Card

To activate a card, use the Cards SDK service method cardsService.activateCard. Pass the session_token, the wallet_uuid, the card_uuid, the ActivateCardRequest model and the ActivateCardSdkCallback.

val model = ActivateCardRequest(...)
cardsService.activateCard(
    sessionToken = session_token,
    walletUuid = wallet_uuid,
    cardUuid = card_uuid,
    data = model,
    clientCallback = activateCardSdkCallback
)

The result of this action will return on onSuccess() and any errors will be returned on onEvent(event: String, metadata: Map<String, String>?), both from the callback.

Freeze Card

To freeze a card, use the Cards SDK service method cardsService.freezeCard. Pass the session_token, the wallet_uuid, the card_uuid and the FreezeCardSdkCallback.

cardsService.freezeCard(
    sessionToken = session_token,
    walletUuid = wallet_uuid,
    cardUuid = card_uuid,
    clientCallback = freezeCardSdkCallback
)

The result of this action will return on onSuccess() and any errors will be returned on onEvent(event: String, metadata: Map<String, String>?), both from the callback.

Unfreeze Card

To unfreeze a card, use the Cards SDK service method cardsService.unfreezeCard. Pass the session_token, the wallet_uuid, the card_uuid and the UnfreezeCardSdkCallback.

cardsService.unfreezeCard(
    sessionToken = session_token,
    walletUuid = wallet_uuid,
    cardUuid = card_uuid,
    clientCallback = unfreezeCardSdkCallback
)

The result of this action will return on onSuccess() and any errors will be returned on onEvent(event: String, metadata: Map<String, String>?), both from the callback.

Cancel Card

To cancel a card, use the Cards SDK service method cardsService.cancelCard. Pass the session_token, the wallet_uuid, the card_uuid and the CancelCardSdkCallback.

cardsService.cancelCard(
    sessionToken = session_token,
    walletUuid = wallet_uuid,
    cardUuid = card_uuid,
    clientCallback = cancelCardSdkCallback
)

The result of this action will return on onSuccess() and any errors will be returned on onEvent(event: String, metadata: Map<String, String>?), both from the callback.

Set Card PIN

To set a card PIN, use the Cards SDK service method cardsService.setCardPin. Pass the session_token, the card_uuid, the CardPinRequest model and the CancelCardSdkCallback.

val model = CardPinRequest(...)
cardsService.cancelCard(
    sessionToken = session_token,
    cardUuid = card_uuid,
    data = model,
    clientCallback = setCardPinSdkCallback
)

The result of this action will return on onSuccess() and any errors will be returned on onEvent(event: String, metadata: Map<String, String>?), both from the callback.

Digital Wallet

This section outlines the integration with Alviere to manage digital wallets of Google and Samsung. To start, get the CardsSdk service interface instance or use with Dependency Injection.

private val cardsService = CardsSdk.service

Declare the callback

These callbacks are the main communication back channel to your application. For each action there is one method associated as follows. In addition to this methods, there is also an event method for handling events. Callbacks will always run on main thread.

private val addCardDigitalWalletSdkCallback = object : AddCardDigitalWalletSdkCallback {
  override fun onAddCardGoogleSuccess() { /* handle success */ }

  override fun onProvisioningRequestGoogleSuccess() { /* handle success */ }

  override fun onAddCardSamsungSuccess() { /* handle success */ }

  override fun onEvent(event: String, metadata: Map<String, String>?) { /* handle event */
  }
}

onSuccess

This callback method is called when a card was successfully added to a digital wallet or in case of Google provisioning request received from Alviere services.

onEvent

This callback method is called when the user exited from the Cards SDK, when an error occurred, or when certain events in the Cards SDK flow have occurred. This allows your application to get more information about what is going on as the user goes through the Cards SDK flow. In case of an error, you may want to display information related to the error to the user and have them try doing the action again.

Add Card

Google Digital Wallet

The Add card to Google digital wallet is implemented through requesting a provisioning request from Alviere services and then receiving a result from Google SDK's on onActivityResult. This solution is limited and deprecated but we don't have control over this design by Google.

To get started, set the Cards SDK event listener.

CardsSdk.setEventListener(addCardDigitalWalletSdkCallback)

Check Google digital wallet support

Before using this feature, we should check if Google digital wallet is supported by checking if is the default payment method and get the active wallet ID and stable hardware ID needed to prepare a Provisioning Request by using:

private val googleWalletSupport: GoogleWalletSupport by lazy {
  cardsService.getGoogleWalletSupport(requireActivity())
}

googleWalletSupport.getGoogleWalletStatusInfo(object : GoogleWalletStatusInfoListener {
  override fun onGetStatusInfo(statusInfo: GoogleWalletStatusInfo) {
    when (statusInfo.status) {
      GoogleWalletStatus.DEFAULT_WALLET -> {
        walletId = statusInfo.walletId
        hardwareId = statusInfo.hardwareId
      }
      GoogleWalletStatus.NOT_DEFAULT_WALLET -> { ... }
      GoogleWalletStatus.MISSING_INFO -> { ... }
      GoogleWalletStatus.NOT_SUPPORTED -> { ... }
    }
  }
})

Check Google digital wallet card token status

Before showing a UI button to add a card to Google digital wallet, we should check the previews wallet support and if card is already added to this wallet by using:

private val googleWalletSupport: GoogleWalletSupport by lazy {
  cardsService.getGoogleWalletSupport(requireActivity())
}

googleWalletSupport.getCardTokenStatus(
  last4Digits = last_four_digits
  cardBrand = CardBrandModel.MASTERCARD,
  cardTokenStatusListener = object : CardTokenStatusListener {
    override fun onGetStatus(isTokenized: Boolean) {
      // ...
    }
  }
)

Add Card - Provisioning and Google SDK result

To add a card to Google digital wallet, use the Cards SDK service method cardsService.addCardDigitalWalletGoogle. Pass the activity_for_result, the session_token, the wallet_uuid, the card_uuid, and the AddCardGoogleRequest. Add cardsService.handleAddCardDigitalWalletGoogle to activity onActivityResult.

val model = AddCardGoogleRequest(...)
cardsService.addCardDigitalWalletGoogle(
    activity = activity_for_result,
    sessionToken = session_token,
    walletUuid = wallet_uuid,
    cardUuid = card_uuid,
    data = model,
)

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
  super.onActivityResult(requestCode, resultCode, data)
  cardsService.handleAddCardDigitalWalletGoogle(requestCode, resultCode)
}

The result of this action will return on onProvisioningRequestGoogleSuccess() after receiving a provisioning request from Alviere services and onAddCardGoogleSuccess() if success adding a card to Google digital wallet and any errors will be returned on onEvent(event: String, metadata: Map<String, String>?), both from the callback.

Samsung Digital Wallet

The Add card to Samsung digital wallet is implemented through Activity or through the navigation controller. To get started, set the Cards SDK event listener.

CardsSdk.setEventListener(addCardDigitalWalletSdkCallback)

Check Samsung wallet support

Before adding a card to Samsung wallet, we can optionally check if Samsung wallet is supported by using

private val samsungWalletSupport: SamsungWalletSupport by lazy {
    cardsService.getSamsungWalletSupport(context, samsung_service_id)
}

samsungWalletSupport.checkSamsungWalletSupport(object : SupportStatusListener {
  override fun onGetStatus(supported: Boolean) {
    // ...
  }
})

Activity

To start using this feature on an activity, create an Intent using cardsService.addCardDigitalWalletSamsungByIntent, pass the parent_activity, the session_token, the wallet_uuid,the card_uuid, the CardBrandModel and the samsung_service_id assigned by the Samsung Pay Developers portal.

val intent = cardsService.addCardDigitalWalletSamsungByIntent(
  parentActivity = parent_activity,
  sessionToken = session_token,
  walletUuid = wallet_uuid,
  cardUuid = card_uuid,
  cardBrand = CardBrandModel.MASTERCARD,
  samsungServiceId = samsung_service_id
)
startActivity(intent)

To start using this feature on a navigation controller, add the destination CradsActivity to your navigation graph and connect it. An action will be generated that will have to have the arguments embedded, as follows.

<fragment
    android:id="@+id/digital_wallet_fragment"
    android:name="com.example.app.DigitalWalletFragment">
    <action
        android:id="@+id/action_digital_wallet_fragment_to_add_card_digital_wallet_samsung_pay_by_activity"
        app:destination="@id/add_card_digital_wallet_samsung_pay_by_activity" />
</fragment>

<activity
    android:id="@+id/add_card_digital_wallet_samsung_pay_by_activity"
    android:name="com.alviere.android.cards.activity.view.CardsActivity">
    <argument
        android:name="cards_extra_feature"
        app:argType="com.alviere.android.cards.CardsSdk$Features" />
    <argument
        android:name="cards_extra_session_token"
        app:argType="string" />
    <argument
        android:name="cards_extra_wallet_uuid"
        app:argType="string" />
    <argument
        android:name="cards_extra_card_uuid"
        app:argType="string" />
    <argument
        android:name="cards_extra_card_brand"
        app:argType="com.alviere.android.cards.sdk.model.common.CardBrandModel" />
    <argument
        android:name="cards_extra_samsung_service_id"
        app:argType="string" />
</activity>

Using Safe Args a class is created for each destination where an action originates. The name of this class is the name of the originating destination, appended with the word "Directions". For example, if the originating destination is a fragment that is named DigitalWalletFragment, the generated class would be called DigitalWalletFragmentDirections. This class has a method for each action defined in the originating destination, such as actionDigitalWalletFragmentToAddCardDigitalWalletSamsungPayByActivity() that returns a NavDirections object. This returned NavDirections object can then be passed directly to navigate(), as shown in the following example:

view.findNavController().navigate(
  DigitalWalletFragmentDirections.actionDigitalWalletFragmentToAddCardDigitalWalletSamsungPayByActivity(
    cardsExtraFeature = CardsSdk.Features.ADD_CARD_DIGITAL_WALLET_SAMSUNG,
    cardsExtraSessionToken = session_token,
    cardsExtraWalletUuid = wallet_uuid,
    cardsExtraCardUuid = card_uuid,
    cardsExtraCardBrand = CardBrandModel.MASTERCARD,
    cardsExtraSamsungServiceId = samsiung_service_id
  )
)

Incentives

This section describes how to manage incentives with the Alviere platform. To start, get the CardsSdk service interface instance or use with Dependency Injection.

private val cardsService = CardsSdk.service

Declare the callback

These callbacks are the main communication back channel to your application. For each action there is one method associated as follows. In addition to these methods, there is also an event method for handling events. Callbacks will always run on main thread.

private val listIncentiveRulesSdkCallback = object : ListIncentiveRulesSdkCallback {
  override fun onSuccess(incentiveRules: List<IncentiveRuleDetailsModel>) { /* handle success */ }

  override fun onEvent(event: String, metadata: Map<String, String>?) { /* handle event */ }
}

private val getIncentiveRuleSdkCallback = object : GetIncentiveRuleSdkCallback {
  override fun onSuccess(incentiveRuleDetails: IncentiveRuleDetailsModel) { /* handle success */ }

  override fun onEvent(event: String, metadata: Map<String, String>?) { /* handle event */ }
}

onSuccess

This callback method is called when a request was successfully executed. Use this to manage incentives with the Alviere API.

onEvent

This callback method is called when the user exited from the Cards SDK, when an error occurred, or when certain events in the Cards SDK flow have occurred. This allows your application to get more information about what is going on as the user goes through the Cards SDK flow. In case of an error, you may want to display information related to the error to the user and have them try doing the action again.

List Incentive Rules

To get a list of incentive rules, use the Cards SDK service method cardsService.listIncentiveRules. Pass the session_token, the ListIncentiveRulesSdkCallback and the limit/offset/incentiveScope/incentiveType, optionally.

cardsService.listIncentiveRules(
    sessionToken = session_token,
    clientCallback = listIncentiveRulesSdkCallback
)

The result of this action will return the incentive rules List<IncentiveRuleDetailsModel> on onSuccess(incentiveRules: List<IncentiveRuleDetailsModel>) and any errors will be returned on onEvent(event: String, metadata: Map<String, String>?), both from the callback.

Get Incentive Rule

To get a incentive rule, use the Cards SDK service method cardsService.getIncentiveRule. Pass the session_token, the rule_uuid and the GetIncentiveRuleSdkCallback.

cardsService.getIncentiveRule(
    sessionToken = session_token,
    ruleUuid = rule_uuid,
    clientCallback = getIncentiveRuleSdkCallback
)

The result of this action will return the incentive rule IncentiveRuleDetailsModel on onSuccess(incentiveRuleDetails: IncentiveRuleDetailsModel) and any errors will be returned on onEvent(event: String, metadata: Map<String, String>?), both from the callback.

Alternative Usage

Optionally for every SDK callback entry function without UI, there is an alternative suspend function with the same name without callback to run inside a kotlin coroutine. Internal code will run with withContext(Dispatchers.IO) and will return an object of type Response<T>.

val response = ...
when (response) {
  is Response.Success -> { response.data }
  is Response.Error -> { response.metadata }
}

Customization

To start using the CardsCustomize create the custom object and set it by CardsSdk.setCustomize. This will override only the values that you want to customize.

First we have customization objects by features, as follows:

Class Attribute Description
CardsCustomize digitalWalletCustomize Add card to digital wallet customization

Then we have all the view components for each of these features. As follows:

Class Attribute Description
ToolbarCustomize backgroundColorRes Background color resource
showBackButton Back button visibility
showCloseButton Close button visibility
Class Attribute Description
AlviereTextViewCustomize textColorRes text color resource
textSizeRes Text size resource
textColor Text color
textSize Text size

View Resources

In addition to all Cards SDK functionalities, the Alviere SDKs also provides the ability to customize view resources.

Custom view components can be configured in two ways. The easiest (and recommended) method is by overriding colors.xml, strings.xml and dimens.xml resources, setting the key and value according to the following table. Alternatively, you can create customization object.

Override resources

To start using the customization by resources just override the keys that you want to customize.

Themes

The Cards SDK for Android allows you to customize the main UI Theme used by activities. To do so, you will need to override the theme key that you want to change on your themes.xml file from values and values-night folder. Some UI elements use specific colors that need to be override apart in values and values-night.

<style name="CardsSdkTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
    <item name="colorPrimary">@color/alviere_sdk_cards_color_primary</item>
    <item name="colorPrimaryVariant">@color/alviere_sdk_cards_color_primary_variant</item>
    <item name="colorOnPrimary">@color/alviere_sdk_cards_color_on_primary</item>
    <item name="colorSecondary">@color/alviere_sdk_cards_color_secondary</item>
    <item name="colorSecondaryVariant">@color/alviere_sdk_cards_color_secondary_variant</item>
    <item name="colorOnSecondary">@color/alviere_sdk_cards_color_on_secondary</item>
    <item name="android:statusBarColor">@color/alviere_sdk_cards_color_status_bar</item>
    <item name="android:navigationBarColor">@color/alviere_sdk_cards_color_navigation_bar</item>
    <item name="android:windowBackground">@color/alviere_sdk_cards_color_background</item>
    <item name="android:fontFamily">@string/alviere_sdk_cards_font</item>
    <item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">true</item>
</style>

<style name="CardsSdkTheme.NoActionBar">
    <item name="windowActionBar">false</item>
    <item name="windowNoTitle">true</item>
</style>

Fonts

The Cards SDK for Android allows you to customize the UI font. To do so, you will need to override the font key that you want to change on your strings.xml file. The next section details a list of the current available keys.

Key CardsCustomize Support
alviere_sdk_cards_font No

Colors

The Cards SDK for Android allows you to customize the UI colors. To do so, you will need to override the color key that you want to change on your colors.xml file from values and values-night folders. The next section details a list of the current available keys.

Key CardsCustomize Support
alviere_sdk_cards_color_primary No
alviere_sdk_cards_color_primary_variant No
alviere_sdk_cards_color_on_primary No
alviere_sdk_cards_color_secondary No
alviere_sdk_cards_color_secondary_variant No
alviere_sdk_cards_color_on_secondary No
alviere_sdk_cards_color_status_bar No
alviere_sdk_cards_color_navigation_bar No
alviere_sdk_cards_color_background No
Key CardsCustomize Support
alviere_sdk_cards_digital_wallet_background Yes
alviere_sdk_cards_digital_wallet_text_color Yes (alviereTextView)
Key CardsCustomize Support
alviere_sdk_cards_loading_bar Yes
Key CardsCustomize Support
alviere_sdk_cards_toolbar_background Yes
alviere_sdk_cards_toolbar_title_text_color No
alviere_sdk_cards_toolbar_buttons_color No

Text and Localization

The Cards SDK for Android allows you to customize the UI text. To do so, you will need to override the string key that you want to change on your strings.xml file. The next section details a list of the current available keys. Currently, the SDK only supports english.

Key English Value CardsCustomize Support
alviere_sdk_cards_digital_wallet_samsung_add_card_title Add Card Yes
alviere_sdk_cards_digital_wallet_samsung_add_card_message Adding card to wallet. Yes
alviere_sdk_cards_digital_wallet_samsung_not_supported_message Samsung wallet not installed or not supported. Yes

Dimensions

The Cards SDK for Android allows you to customize the UI dimensions. To do so, you will need to override the dimension key that you want to change on your dimens.xml file. The next section details a list of the current available keys.

Key CardsCustomize Support
alviere_sdk_cards_digital_wallet_text_size Yes