accounts

Accounts SDK for Android

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

Features

Accounts

  • Get Account

  • Update Account

  • Create Address

  • List Addresses

  • Update Address

  • Delete Address

Dossiers

  • Create Dossier

  • Update Dossier

  • Replace Dossier

  • Document Capture Only

  • List Dossiers

  • Get Dossier

  • Delete Dossier

Requirements

  • Android Studio 4.0 or above

  • Android 5.0 (API level 21) or above

  • Java 11+

Maven Central Integration

  1. Add Maven Central to project repositories

repositories {
...
mavenCentral()
}
  1. Add Sdk dependency to module's build.gradle file using the latest version.

dependencies {
...
implementation 'com.alviere.android:accounts:0.9.17'
}

Manual Integration

  1. Get the latest versions of accounts.aar and alcore.aar, and open up the project structure by right-clicking on your project and choosing Open Module Settings or choosing File Project Structure…. Click the + button in the top left to add a new module.

image

  1. Choose Import .JAR/.AAR Package and click the Next button.

image

  1. Find your accounts.aar file using the folder button beside the File name field. Android Studio will automatically create a subproject name. Just click Finish and repeat the process for the alcore.aar file.

image

  1. Gradle will sync, which may take a few minutes. You should have the following implementation statements on your module's build.gradle file. Please note that sometimes Android Studio generates these statements on the project's build.gradle file. In that case, move them to the module's one.

...
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
...
implementation project(path: ':alcore')
implementation project(path: ':accounts')
}
  1. 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()
}
}
  1. Now that you have added the .aar modules, you need to add its dependencies as shown below. Once complete, sync gradle again.

apply plugin: 'com.android.application'
apply plugin: 'kotlin-kapt'
...
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
...
implementation project(path: ':alcore')
implementation project(path: ':accounts')
...
}

Usage

Before you can use the Accounts Sdk, and if you want to call the user management services you need to first start the AccountsSdk. Keep in mind that the process of starting the Sdk it will be run in the UI thread and cannot be run in the IO thread.

AccountsSdk.init()

On your android application class, setup Alviere Initialization and Fraud Detection.

class AndroidApplication : Application() {

override fun onCreate() {
super.onCreate()

Alviere.init(this, EnvironmentOption.PRD)
}
}

Request camera runtime permission for document capture.

ActivityCompat.requestPermissions(..., arrayOf(Manifest.permission.CAMERA),...)

Kotlin Coroutines

Optionally for every Sdk callback entry function without UI, there is an alternative suspend function with the same name without callback. 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 }
}

Accounts

This section outlines the integration with Alviere to manage accounts.

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 getAccountSdkCallback = object : GetAccountSdkCallback {
override fun onSuccess(account: AccountDetailsModel) { /* handle success */ }

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

private val updateAccountSdkCallback = object : UpdateAccountSdkCallback {
override fun onSuccess(account: AccountDetailsModel) { /* handle success */ }

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

private val createAddressSdkCallback = object : CreateAddressSdkCallback {
override fun onSuccess(address: AddressDetailsModel) { /* handle success */ }

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

private val listAddressesSdkCallback = object : ListAddressesSdkCallback {
override fun onSuccess(addresses: List<AddressDetailsModel>) { /* handle success */ }

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

private val updateAddressSdkCallback = object : UpdateAddressSdkCallback {
override fun onSuccess(address: AddressDetailsModel) { /* handle success */ }

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

This callback method is called when an account request was successfully executed. Use this to manage accounts and store the accounts with your service for use with the Alviere API.

onEvent

This callback method is called when the user exited from the Accounts SDK, when an error occurred, or when certain events in the Accounts SDK flow have occurred. This allows your application to get more information about what is going on as the user goes through the Accounts 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.

Get Account

To obtain an account, use the Accounts Sdk service method AccountsSdk.getAccount. Pass the session_token, the account_uuid and the GetAccountSdkCallback.

AccountsSdk.getAccount(
sessionToken = session_token,
accountUuid = account_uuid,
clientCallback = getAccountSdkCallback
)

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

Update Account

To update an account, use the Accounts Sdk service method AccountsSdk.updateAccount. Pass the session_token, the account_uuid, the AccountUpdateRequest model and the UpdateAccountSdkCallback.

val model = AccountUpdateRequest(...)
AccountsSdk.updateAccount(
sessionToken = session_token,
accountUuid = account_uuid,
data = model,
clientCallback = updateAccountSdkCallback
)

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

Create Address

To add an account address, use the Accounts Sdk service method AccountsSdk.createAddress. Pass the session_token, the account_uuid, the AddressRequest model and the CreateAddressSdkCallback.

val model = AddressRequest(...)
AccountsSdk.createAddress(
sessionToken = session_token,
accountUuid = account_uuid,
data = model,
clientCallback = createAddressSdkCallback
)

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

List Addresses

To get a list of addresses from an account, use the Accounts Sdk service method AccountsSdk.listAddresses. Pass the session_token, the account_uuid and the listAddressesSdkCallback.

AccountsSdk.listAddresses(
sessionToken = session_token,
accountUuid = account_uuid,
clientCallback = listAddressesSdkCallback
)

The result of this action will return the account's addresses List<AddressDetailsModel> on onSuccess(addresses: List<AddressDetailsModel>) and any errors will be returned ononEvent(event: String, metadata: Map<String, String>?), both from the callback.

Update Address

To update an account address, use the Accounts Sdk service method AccountsSdk.updateAddress. Pass the session_token, the account_uuid, the address_uuid, the AddressUpdateRequest model and the UpdateAddressSdkCallback.

val model = AddressUpdateRequest(...)
AccountsSdk.updateAddress(
sessionToken = session_token,
accountUuid = account_uuid,
addressUuid = address_uuid,
data = model,
clientCallback = updateAddressSdkCallback
)

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

Delete Address

To delete an account address, use the Accounts Sdk service method AccountsSdk.deleteAddress. Pass the session_token, the account_uuid, the address_uuid and the DeleteAddressSdkCallback.

AccountsSdk.deleteAddress(
sessionToken = session_token,
accountUuid = account_uuid,
addressUuid = address_uuid,
clientCallback = deleteAddressSdkCallback
)

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.

Dossiers

This section outlines the integration with Alviere to manage dossiers of documents.

Declare the callback

These callbacks is 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 dossierByIntentSdkCallback = object : DossierByIntentSdkCallback {
override fun onCreateSuccess(dossier: DossierDetailsModel) { /* handle success */ }

override fun onUpdateSuccess(dossier: DossierDetailsModel) { /* handle success */ }

override fun onReplaceSuccess(dossier: DossierDetailsModel) { /* handle success */ }

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

private val documentCaptureSdkCallback = object : DocumentCaptureSdkCallback {
override fun onSuccess(documents: List<DocumentCaptureDetailsModel>) { /* handle success */ }

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

private val listDossiersSdkCallback = object : ListDossiersSdkCallback {
override fun onSuccess(dossiers: List<DossierDetailsModel>) { /* handle success */ }

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

private val getDossierSdkCallback = object : GetDossierSdkCallback {
override fun onSuccess(dossier: DossierFileDetailsModel) { /* handle success */ }

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

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

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

This callback method is called when a dossier request was successfully executed. Use this to manage dossiers of an account with the Alviere API.

onEvent

This callback method is called when the user exited from the Accounts SDK, when an error occurred, or when certain events in the Accounts SDK flow have occurred. This allows your application to get more information about what is going on as the user goes through the Accounts 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.

UI - Dossier

The Create, Update or Replace a Dossier of Documents, a Capture Mode through Activity or through the navigation controller. To get started, set the Accounts Sdk event listener.

AccountsSdk.setEventListener(dossierByIntentSdkCallback)

Create Dossier

Activity

To start using this feature on an activity, create an Intent using AccountsSdk.createDossierByIntent, pass the parent_activity, the session_token, the external_id, the account_uuid, the primary_dossier, and an array of files to be capture using DocumentTypeModel with a selection of different document types.

val intent = AccountsSdk.createDossierByIntent(
parentActivity = parent_activity,
sessionToken = session_token,
externalId = external_id,
accountUuid = account_uuid,
primary = primary_dossier,
filesToCapture = arrayOf(
DocumentTypeModel.ID_DOCUMENT_FRONT,
DocumentTypeModel.ID_DOCUMENT_BACK,
DocumentTypeModel.DRIVER_LICENSE_FRONT,
DocumentTypeModel.DRIVER_LICENSE_BACK,
DocumentTypeModel.MC_DOCUMENT_FRONT,
DocumentTypeModel.MC_DOCUMENT_BACK,
DocumentTypeModel.INE_FRONT,
DocumentTypeModel.INE_BACK,
DocumentTypeModel.SELFIE,
DocumentTypeModel.PASSPORT,
DocumentTypeModel.PROOF_OF_ADDRESS,
DocumentTypeModel.PROOF_OF_FUNDS
)
)
startActivity(intent)
Navigation Controller

To start using this feature on a navigation controller, add the destination AccountsActivity 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/accounts_dossiers_fragment_create"
android:name="com.example.app.CreateDossierFragment">
<action
android:id="@+id/action_accounts_dossiers_fragment_create_to_accounts_activity"
app:destination="@id/accounts_activity" />
</fragment>

<activity
android:id="@+id/accounts_activity"
android:name="com.alviere.android.accounts.activity.view.AccountsActivity">
<argument
android:name="accounts_extra_feature_frag"
app:argType="com.alviere.android.accounts.AccountsSdk$Features" />
<argument
android:name="accounts_token_extra"
app:argType="string"
app:nullable="true"
android:defaultValue="@null" />
<argument
android:name="accounts_external_id_extra"
app:argType="string"
app:nullable="true"
android:defaultValue="@null" />
<argument
android:name="accounts_uuid_extra"
app:argType="string"
app:nullable="true"
android:defaultValue="@null" />
<argument
android:name="accounts_dossier_uuid_extra"
app:argType="string"
app:nullable="true"
android:defaultValue="@null" />
<argument
android:name="accounts_primary_extra"
app:argType="boolean"
android:defaultValue="false" />
<argument
android:name="accounts_document_capture_only_extra"
app:argType="boolean"
android:defaultValue="false" />
<argument
android:name="accounts_files_to_capture_extra"
app:argType="com.alviere.android.accounts.sdk.model.common.DocumentTypeModel[]" />
</activity>

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 CreateDossierFragment, the generated class would be called CreateDossierFragmentDirections. This class has a method for each action defined in the originating destination, such as actionAccountsDossiersFragmentCreateToAccountsActivity() that returns a NavDirections object. This returned NavDirections object can then be passed directly to navigate(), as shown in the following example:

it.findNavController().navigate(
CreateDossierFragmentDirections.actionAccountsDossiersFragmentCreateToAccountsActivity(
accountsExtraFeatureFrag = AccountsSdk.Features.CREATE_DOSSIER,
accountsTokenExtra = session_token,
accountsExternalIdExtra = external_id,
accountsUuidExtra = account_uuid,
accountsPrimaryExtra = true,
accountsFilesToCaptureExtra = arrayOf(
DocumentTypeModel.ID_DOCUMENT_FRONT,
DocumentTypeModel.ID_DOCUMENT_BACK,
DocumentTypeModel.DRIVER_LICENSE_FRONT,
DocumentTypeModel.DRIVER_LICENSE_BACK,
DocumentTypeModel.MC_DOCUMENT_FRONT,
DocumentTypeModel.MC_DOCUMENT_BACK,
DocumentTypeModel.INE_FRONT,
DocumentTypeModel.INE_BACK,
DocumentTypeModel.SELFIE,
DocumentTypeModel.PASSPORT,
DocumentTypeModel.PROOF_OF_ADDRESS,
DocumentTypeModel.PROOF_OF_FUNDS
)
)
)

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

Update Dossier

Activity

To start using this feature on an activity, create an Intent using __AccountsSdk.updateDossierByIntent, pass the parent_activity, the session_token, the account_uuid, the dossier_uuid and an array of files to be capture using DocumentTypeModel with a selection of different document types. The external_id is optional.

val intent = AccountsSdk.updateDossierByIntent(
parentActivity = parent_activity,
sessionToken = session_token,
externalId = external_id,
accountUuid = account_uuid,
dossierUuid = dossier_uuid,
filesToCapture = arrayOf(
DocumentTypeModel.ID_DOCUMENT_FRONT,
DocumentTypeModel.ID_DOCUMENT_BACK,
DocumentTypeModel.DRIVER_LICENSE_FRONT,
DocumentTypeModel.DRIVER_LICENSE_BACK,
DocumentTypeModel.MC_DOCUMENT_FRONT,
DocumentTypeModel.MC_DOCUMENT_BACK,
DocumentTypeModel.INE_FRONT,
DocumentTypeModel.INE_BACK,
DocumentTypeModel.SELFIE,
DocumentTypeModel.PASSPORT,
DocumentTypeModel.PROOF_OF_ADDRESS,
DocumentTypeModel.PROOF_OF_FUNDS
)
)
startActivity(intent)
Navigation Controller

To start using this feature on a navigation controller, add the destination AccountsActivity 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/accounts_dossiers_fragment_update"
android:name="com.example.app.UpdateDossierFragment">
<action
android:id="@+id/action_accounts_dossiers_fragment_update_to_accounts_activity"
app:destination="@id/accounts_activity" />
</fragment>

<activity
android:id="@+id/accounts_activity"
android:name="com.alviere.android.accounts.activity.view.AccountsActivity">
<argument
android:name="accounts_extra_feature_frag"
app:argType="com.alviere.android.accounts.AccountsSdk$Features" />
<argument
android:name="accounts_token_extra"
app:argType="string"
app:nullable="true"
android:defaultValue="@null" />
<argument
android:name="accounts_external_id_extra"
app:argType="string"
app:nullable="true"
android:defaultValue="@null" />
<argument
android:name="accounts_uuid_extra"
app:argType="string"
app:nullable="true"
android:defaultValue="@null" />
<argument
android:name="accounts_dossier_uuid_extra"
app:argType="string"
app:nullable="true"
android:defaultValue="@null" />
<argument
android:name="accounts_primary_extra"
app:argType="boolean"
android:defaultValue="false" />
<argument
android:name="accounts_document_capture_only_extra"
app:argType="boolean"
android:defaultValue="false" />
<argument
android:name="accounts_files_to_capture_extra"
app:argType="com.alviere.android.accounts.sdk.model.common.DocumentTypeModel[]" />
</activity>

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 UpdateDossierFragment, the generated class would be called UpdateDossierFragmentDirections. This class has a method for each action defined in the originating destination, such as actionAccountsDossiersFragmentUpdateToAccountsActivity() that returns a NavDirections object. This returned NavDirections object can then be passed directly to navigate(), as shown in the following example:

it.findNavController().navigate(
UpdateDossierFragmentDirections.actionAccountsDossiersFragmentUpdateToAccountsActivity(
accountsExtraFeatureFrag = AccountsSdk.Features.UPDATE_DOSSIER,
accountsTokenExtra = session_token,
accountsUuidExtra = account_uuid,
accountsDossierUuidExtra = dossier_uuid,
accountsFilesToCaptureExtra = arrayOf(
DocumentTypeModel.ID_DOCUMENT_FRONT,
DocumentTypeModel.ID_DOCUMENT_BACK,
DocumentTypeModel.DRIVER_LICENSE_FRONT,
DocumentTypeModel.DRIVER_LICENSE_BACK,
DocumentTypeModel.MC_DOCUMENT_FRONT,
DocumentTypeModel.MC_DOCUMENT_BACK,
DocumentTypeModel.INE_FRONT,
DocumentTypeModel.INE_BACK,
DocumentTypeModel.SELFIE,
DocumentTypeModel.PASSPORT,
DocumentTypeModel.PROOF_OF_ADDRESS,
DocumentTypeModel.PROOF_OF_FUNDS
)
)
)

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

Replace Dossier

Activity

To start using this feature on an activity, create an Intent using __AccountsSdk.replaceDossierByIntent, pass the parent_activity, the session_token, the account_uuid, the dossier_uuid and an array of files to be capture using DocumentTypeModel with a selection of different document types.

val intent = AccountsSdk.replaceDossierByIntent(
parentActivity = parent_activity,
sessionToken = session_token,
accountUuid = account_uuid,
dossierUuid = dossier_uuid,
filesToCapture = arrayOf(
DocumentTypeModel.ID_DOCUMENT_FRONT,
DocumentTypeModel.ID_DOCUMENT_BACK,
DocumentTypeModel.DRIVER_LICENSE_FRONT,
DocumentTypeModel.DRIVER_LICENSE_BACK,
DocumentTypeModel.MC_DOCUMENT_FRONT,
DocumentTypeModel.MC_DOCUMENT_BACK,
DocumentTypeModel.INE_FRONT,
DocumentTypeModel.INE_BACK,
DocumentTypeModel.SELFIE,
DocumentTypeModel.PASSPORT,
DocumentTypeModel.PROOF_OF_ADDRESS,
DocumentTypeModel.PROOF_OF_FUNDS
)
)
startActivity(intent)
Navigation Controller

To start using this feature on a navigation controller, add the destination AccountsActivity 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/accounts_dossiers_fragment_replace"
android:name="com.example.app.ReplaceDossierFragment">
<action
android:id="@+id/action_accounts_dossiers_fragment_replace_to_accounts_activity"
app:destination="@id/accounts_activity" />
</fragment>

<activity
android:id="@+id/accounts_activity"
android:name="com.alviere.android.accounts.activity.view.AccountsActivity">
<argument
android:name="accounts_extra_feature_frag"
app:argType="com.alviere.android.accounts.AccountsSdk$Features" />
<argument
android:name="accounts_token_extra"
app:argType="string"
app:nullable="true"
android:defaultValue="@null" />
<argument
android:name="accounts_external_id_extra"
app:argType="string"
app:nullable="true"
android:defaultValue="@null" />
<argument
android:name="accounts_uuid_extra"
app:argType="string"
app:nullable="true"
android:defaultValue="@null" />
<argument
android:name="accounts_dossier_uuid_extra"
app:argType="string"
app:nullable="true"
android:defaultValue="@null" />
<argument
android:name="accounts_primary_extra"
app:argType="boolean"
android:defaultValue="false" />
<argument
android:name="accounts_document_capture_only_extra"
app:argType="boolean"
android:defaultValue="false" />
<argument
android:name="accounts_files_to_capture_extra"
app:argType="com.alviere.android.accounts.sdk.model.common.DocumentTypeModel[]" />
</activity>

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 ReplaceDossierFragment, the generated class would be called ReplaceDossierFragmentDirections. This class has a method for each action defined in the originating destination, such as actionAccountsDossiersFragmentReplaceToAccountsActivity() that returns a NavDirections object. This returned NavDirections object can then be passed directly to navigate(), as shown in the following example:

it.findNavController().navigate(
ReplaceDossierFragmentDirections.actionAccountsDossiersFragmentReplaceToAccountsActivity(
accountsExtraFeatureFrag = AccountsSdk.Features.REPLACE_DOSSIER,
accountsTokenExtra = session_token,
accountsUuidExtra = account_uuid,
accountsDossierUuidExtra = dossier_uuid,
accountsFilesToCaptureExtra = arrayOf(
DocumentTypeModel.ID_DOCUMENT_FRONT,
DocumentTypeModel.ID_DOCUMENT_BACK,
DocumentTypeModel.DRIVER_LICENSE_FRONT,
DocumentTypeModel.DRIVER_LICENSE_BACK,
DocumentTypeModel.MC_DOCUMENT_FRONT,
DocumentTypeModel.MC_DOCUMENT_BACK,
DocumentTypeModel.INE_FRONT,
DocumentTypeModel.INE_BACK,
DocumentTypeModel.SELFIE,
DocumentTypeModel.PASSPORT,
DocumentTypeModel.PROOF_OF_ADDRESS,
DocumentTypeModel.PROOF_OF_FUNDS
)
)
)

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

Document Capture Only

Document Capture Only, a Capture Mode through Activity or through the navigation controller. To get started, set the Accounts Sdk event listener.

AccountsSdk.setEventListener(documentCaptureSdkCallback)
Activity

To start using this feature on an activity, create an Intent using AccountsSdk.documentCaptureByIntent, pass the parent_activity and an array of files to be capture using DocumentTypeModel with a selection of different document types.

val intent = AccountsSdk.documentCaptureByIntent(
parentActivity = parent_activity,
filesToCapture = arrayOf(
DocumentTypeModel.ID_DOCUMENT_FRONT,
DocumentTypeModel.ID_DOCUMENT_BACK,
DocumentTypeModel.DRIVER_LICENSE_FRONT,
DocumentTypeModel.DRIVER_LICENSE_BACK,
DocumentTypeModel.MC_DOCUMENT_FRONT,
DocumentTypeModel.MC_DOCUMENT_BACK,
DocumentTypeModel.INE_FRONT,
DocumentTypeModel.INE_BACK,
DocumentTypeModel.SELFIE,
DocumentTypeModel.PASSPORT,
DocumentTypeModel.PROOF_OF_ADDRESS,
DocumentTypeModel.PROOF_OF_FUNDS
)
)
startActivity(intent)
Navigation Controller

To start using this feature on a navigation controller, add the destination AccountsActivity 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/accounts_document_capture"
android:name="com.example.app.DocumentCaptureFragment">
<action
android:id="@+id/action_accounts_document_capture_to_accounts_activity"
app:destination="@id/accounts_activity" />
</fragment>

<activity
android:id="@+id/accounts_activity"
android:name="com.alviere.android.accounts.activity.view.AccountsActivity">
<argument
android:name="accounts_extra_feature_frag"
app:argType="com.alviere.android.accounts.AccountsSdk$Features" />
<argument
android:name="accounts_document_capture_only_extra"
app:argType="boolean"
android:defaultValue="false" />
<argument
android:name="accounts_files_to_capture_extra"
app:argType="com.alviere.android.accounts.sdk.model.common.DocumentTypeModel[]" />
</activity>

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 DocumentCaptureFragment, the generated class would be called DocumentCaptureFragmentDirections. This class has a method for each action defined in the originating destination, such as actionAccountsDocumentCaptureToAccountsActivity() that returns a NavDirections object. This returned NavDirections object can then be passed directly to navigate(), as shown in the following example:

it.findNavController().navigate(
DocumentCaptureFragmentDirections.actionAccountsDocumentCaptureToAccountsActivity(
accountsExtraFeatureFrag = AccountsSdk.Features.DOCUMENT_CAPTURE,
accountsDocumentCaptureOnlyExtra = true,
accountsFilesToCaptureExtra = arrayOf(
DocumentTypeModel.ID_DOCUMENT_FRONT,
DocumentTypeModel.ID_DOCUMENT_BACK,
DocumentTypeModel.DRIVER_LICENSE_FRONT,
DocumentTypeModel.DRIVER_LICENSE_BACK,
DocumentTypeModel.MC_DOCUMENT_FRONT,
DocumentTypeModel.MC_DOCUMENT_BACK,
DocumentTypeModel.INE_FRONT,
DocumentTypeModel.INE_BACK,
DocumentTypeModel.SELFIE,
DocumentTypeModel.PASSPORT,
DocumentTypeModel.PROOF_OF_ADDRESS,
DocumentTypeModel.PROOF_OF_FUNDS
)
)
)

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

List Dossiers

To obtain an user account dossiers of documents, use the Accounts Sdk service method AccountsSdk.listDossiers. Pass the session_token, the account_uuid and the ListDossiersSdkCallback.

AccountsSdk.listDossiers(
sessionToken = session_token,
accountUuid = account_uuid,
clientCallback = accountDocumentCallback
)

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

Get Dossier

To obtain an user account dossier of documents, use the Accounts Sdk service method AccountsSdk.getDossier. Pass the session_token, the account_uuid, the dossier_uuid and the GetDossierSdkCallback.

AccountsSdk.getDossier(
sessionToken = session_token,
accountUuid = account_uuid,
dossierUuid = dossier_uuid,
clientCallback = getDossierSdkCallback
)

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

Delete Dossier

To delete an user account dossier of documents, use the Accounts Sdk service method AccountsSdk.deleteDossier. Pass the session_token, the account_uuid, the dossier_uuid and the DeleteDossierSdkCallback.

AccountsSdk.deleteDossier(
sessionToken = session_token,
accountUuid = account_uuid,
documentId = dossier_uuid,
clientCallback = deleteDossierSdkCallback
)

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.

Fraud Prevention Service

The Accounts SDK has a built-in fraud prevention service. To fully enable the service you need to setup by calling FraudDetection.initFraudDetection(application)

class AppApplication : Application() {

override fun onCreate() {
...
FraudDetection.initFraudDetection(this)
...
}
}

If you already have an account created and want to activate the service on the next app run you just need to set the accountUuid on the service as the user id. For example, you can do this on calling FraudDetection.setFraudUserId(account_uuid) method, as shown below.

private suspend fun xpto(): Response<_> {
return try {
when (val resource = alviereRepo.createUser(...)) {
is Resource.Success -> {
...
FraudDetection.setFraudUserId(result.account.accountUuid)
}
is Resource.Error -> Response.Error(...)
}
} catch (e: Throwable) {
...
}
}

Customize view components

In addition to all Accounts Sdk functionalities, the Alviere Sdks also provides the ability to customize view components.

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 Accounts 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="AccountsSdkTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<item name="colorPrimary">@color/alviere_sdk_accounts_color_primary</item>
<item name="colorPrimaryVariant">@color/alviere_sdk_accounts_color_primary_variant</item>
<item name="colorOnPrimary">@color/alviere_sdk_accounts_color_on_primary</item>
<item name="colorSecondary">@color/alviere_sdk_accounts_color_secondary</item>
<item name="colorSecondaryVariant">@color/alviere_sdk_accounts_color_secondary_variant</item>
<item name="colorOnSecondary">@color/alviere_sdk_accounts_color_on_secondary</item>
<item name="android:statusBarColor">@color/alviere_sdk_accounts_color_status_bar</item>
<item name="android:navigationBarColor">@color/alviere_sdk_accounts_color_navigation_bar</item>
<item name="android:windowBackground">@color/alviere_sdk_accounts_color_background</item>
<item name="android:fontFamily">@string/alviere_sdk_accounts_font</item>
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">true</item>
</style>

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

<style name="AccountsSdkDocumentsCaptureTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:navigationBarColor">@color/alviere_black</item>
<item name="android:fontFamily">@string/alviere_sdk_accounts_font</item>
</style>

<style name="AccountsSdkFacialCaptureTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:navigationBarColor">@color/alviere_black</item>
<item name="android:fontFamily">@string/alviere_sdk_accounts_font</item>
</style>

Fonts

The Accounts 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 | AccountsCustomize Support |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_font | No |
'-----------------------------------------------------------------+--------------------------------'

Colors

The Accounts 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 | AccountsCustomize Support |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_color_primary | No |
'-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_color_primary_variant | No |
'-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_color_on_primary | No |
'-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_color_secondary | No |
'-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_color_secondary_variant | No |
'-----------------------------------------------------------------'--------------------------------'
| alviere_sdk_accounts_color_on_secondary | No |
'-----------------------------------------------------------------'--------------------------------'
| alviere_sdk_accounts_color_status_bar | No |
'-----------------------------------------------------------------'--------------------------------'
| alviere_sdk_accounts_color_navigation_bar | No |
'-----------------------------------------------------------------'--------------------------------'
| alviere_sdk_accounts_color_background | No |
'-----------------------------------------------------------------'--------------------------------'

.-----------------------------------------------------------------.--------------------------------.
| alviere_sdk_accounts_capture_surround_overlay_color | No |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_capture_oval_error_color | No |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_capture_oval_success_color | No |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_capture_success_color | No |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_manual_capture_title_color | Yes (manualCaptureTitleTv) |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_manual_capture_option_color | Yes (manualCaptureOptionsTv) |
'-----------------------------------------------------------------'--------------------------------'

.-----------------------------------------------------------------.--------------------------------.
| alviere_sdk_accounts_loading_background | Yes |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_loading_bar | Yes |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_loading_title | Yes |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_loading_message | Yes |
'-----------------------------------------------------------------'--------------------------------'

.-----------------------------------------------------------------.--------------------------------.
| alviere_sdk_accounts_try_again_background | Yes |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_try_again_error_message_text_color | Yes |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_try_again_button_background | Yes |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_try_again_button_background_pressed | Yes |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_try_again_button_text | Yes |
'-----------------------------------------------------------------'--------------------------------'

.-----------------------------------------------------------------.--------------------------------.
| alviere_sdk_accounts_toolbar_background | Yes |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_toolbar_title_text_color | No |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_toolbar_buttons_color | No |
'-----------------------------------------------------------------'--------------------------------'

Text and Localization

The Accounts 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 | AccountsCustomize Support |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_documents_title_id_document_front | Card Front | Yes |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_documents_title_id_document_back | Card Back | Yes |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_documents_title_driver_license_front | Driver License Front | Yes |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_documents_title_driver_license_back | Driver License Back | Yes |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_documents_title_matricula_consular_front | Matrícula Consular Front | Yes |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_documents_title_matricula_consular_back | Matrícula Consular Back | Yes |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_documents_title_ine_front | INE Front | Yes |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_documents_title_ine_back | INE Back | Yes |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_documents_message_document | Place ID a on a flat surface. | Yes |
| | Please no fingers, | |
| | hands or reflections. | |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_documents_message_document_manual | Place ID on a flat surface. | Yes |
| | Please no fingers, | |
| | hands or reflections. | |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_documents_title_passport | Passport | Yes |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_documents_title_proof_of_address | Proof of address | Yes |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_documents_title_proof_of_funds | Proof of funds | Yes |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_documents_message_proof_of_address | Place document on a | Yes |
| | flat surface. | |
| | Please no fingers, | |
| | hands or reflections. | |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_documents_message_proof_of_funds | Place document on a | Yes |
| | flat surface. | |
| | Please no fingers, | |
| | hands or reflections. | |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_documents_title_selfie | Selfie | Yes |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_documents_message_selfie | Smile to automatically grab | Yes |
| | your picture | |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_documents_message_selfie_manual | Take a picture | Yes |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_documents_step | Step %1$d of %2$d | Yes |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_documents_is_photo_ok | Accept photo? | Yes |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_documents_accept_photo | Accept | Yes |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_documents_retake | Cancel | Yes |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_documents_success | Success | Yes |
'-----------------------------------------------------------------'--------------------------------'----------------------------'

.-----------------------------------------------------------------.--------------------------------.----------------------------.
| alviere_sdk_accounts_facialcapture_hint_no_face | No face detected | No |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_facialcapture_hint_multiple_faces | Multiple faces detected | No |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_facialcapture_hint_face_center | Center Face In The Oval | No |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_facialcapture_hint_get_farther | Get farther | No |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_facialcapture_hint_get_closer | Get closer | No |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_facialcapture_hint_smile | Smile | No |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_facialcapture_hint_stop_smiling | Stop smiling | No |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_facialcapture_hint_press_capture_button | Press button when ready | No |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_facialcapture_hint_hold_still | Hold Still | No |
'-----------------------------------------------------------------'--------------------------------'----------------------------'

.-----------------------------------------------------------------.--------------------------------.----------------------------.
| alviere_sdk_accounts_misnap_hint_too_dim | Too dim | No |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_misnap_hint_too_bright | Too bright | No |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_misnap_hint_hold_steady | Hold Still | No |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_misnap_hint_too_far | Too far | No |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_misnap_hint_too_close | Too close | No |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_misnap_hint_angle_too_large | Angle too large | No |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_misnap_hint_angle_rotation | Reduce rotation | No |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_misnap_hint_glare | Reduce glare | No |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_misnap_hint_busy_background | Busy background | No |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_misnap_hint_low_contrast | Low contrast | No |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_misnap_hint_wrong_document | Center the document | No |
'-----------------------------------------------------------------'--------------------------------'----------------------------'

.-----------------------------------------------------------------.--------------------------------.----------------------------.
| alviere_sdk_accounts_loading_title | | Yes |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_loading_message | Uploading | Yes |
'-----------------------------------------------------------------'--------------------------------'----------------------------'

.-----------------------------------------------------------------.--------------------------------.----------------------------.
| alviere_sdk_accounts_try_again_error_message | An error has occurred | No |
:-----------------------------------------------------------------+--------------------------------+----------------------------:
| alviere_sdk_accounts_try_again_error_button_text | Try again | No |
'-----------------------------------------------------------------'--------------------------------'----------------------------'

Dimensions

The Accounts 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 | AccountsCustomize Support |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_documents_title_max_size | Yes |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_capture_overlay_bar_padding | No |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_capture_text_padding | No |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_manual_capture_title_size | Yes (manualCaptureTitleTv) |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_manual_capture_option_size | Yes (manualCaptureOptionsTv) |
'-----------------------------------------------------------------'--------------------------------'

.-----------------------------------------------------------------.--------------------------------.
| alviere_sdk_accounts_loading_title_text_size | Yes |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_loading_message_text_size | Yes |
'-----------------------------------------------------------------'--------------------------------'

.-----------------------------------------------------------------.--------------------------------.
| alviere_sdk_accounts_try_again_button_margin_start | Yes |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_try_again_button_margin_end | Yes |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_try_again_button_margin_bottom | Yes |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_try_again_button_margin_top | Yes |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_try_again_button_corner_radius | No |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_try_again_button_text_size | Yes |
:-----------------------------------------------------------------+--------------------------------:
| alviere_sdk_accounts_try_again_message_text_size | Yes |
'-----------------------------------------------------------------'--------------------------------'

Customization object

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

First we have customization objects by features, as follows:

.---------------------------.----------------------------.-----------------------------------------.
| Class | Attribute | Description |
:---------------------------+----------------------------+-----------------------------------------:
| AccountsCustomize | documentsCustomize | Documents capture 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 |
:---------------------------+----------------------------+-----------------------------------------:
| LoadingCustomize | backgroundColorRes | Background color resource |
| :----------------------------+-----------------------------------------:
| | loadingBarColorRes | Loading bar color resource |
| :----------------------------+-----------------------------------------:
| | loadingTitleRes | Loading title text resource |
| :----------------------------+-----------------------------------------:
| | loadingTitleColorRes | Loading title color resource |
| :----------------------------+-----------------------------------------:
| | loadingTitleTextSizeRes | Loading title text size resource |
| :----------------------------+-----------------------------------------:
| | loadingMessageRes | Loading message text resource |
| :----------------------------+-----------------------------------------:
| | loadingMessageColorRes | Loading message color resource |
| :----------------------------+-----------------------------------------:
| | loadingMessageTextSizeRes | Loading message text size resource |
| :----------------------------+-----------------------------------------:
| | loadingBarColor | Loading bar color |
| :----------------------------+-----------------------------------------:
| | loadingTitle | Loading title text |
| :----------------------------+-----------------------------------------:
| | loadingTitleColor | Loading title color |
| :----------------------------+-----------------------------------------:
| | loadingTitleTextSize | Loading title text size |
| :----------------------------+-----------------------------------------:
| | loadingMessage | Loading message text |
| :----------------------------+-----------------------------------------:
| | loadingMessageColor | Loading message color |
| :----------------------------+-----------------------------------------:
| | loadingMessageTextSize | Loading message text size |
'---------------------------'----------------------------'-----------------------------------------'

.---------------------------.----------------------------.-----------------------------------------.
| Class | Attribute | Description |
:---------------------------+----------------------------+-----------------------------------------:
| TryAgainCustomize | toolbarCustomize | Toolbar customization |
| :----------------------------+-----------------------------------------:
| | backgroundColorRes | Background color resources |
| :----------------------------+-----------------------------------------:
| | errorIcon | Error drawable |
| :----------------------------+-----------------------------------------:
| | errorMessageRes | Error message resources |
| :----------------------------+-----------------------------------------:
| | errorMessageColorRes | Error message color resources |
| :----------------------------+-----------------------------------------:
| | errorMessageTextSizeRes | Error message text size resources |
| :----------------------------+-----------------------------------------:
| | buttonBackgroundRes | Button background drawable |
| :----------------------------+-----------------------------------------:
| | buttonTextRes | Button text resources |
| :----------------------------+-----------------------------------------:
| | buttonTextColorRes | Button text color resources |
| :----------------------------+-----------------------------------------:
| | buttonMarginStartRes | Button margin start resources |
| :----------------------------+-----------------------------------------:
| | buttonMarginEndRes | Button margin end resources |
| :----------------------------+-----------------------------------------:
| | buttonMarginBottomRes | Button margin bottom resources |
| :----------------------------+-----------------------------------------:
| | buttonMarginTopRes | Button margin top resources |
| :----------------------------+-----------------------------------------:
| | buttonTextSizeRes | Button text size resources |
| :----------------------------+-----------------------------------------:
| | backgroundColor | Background color |
| :----------------------------+-----------------------------------------:
| | errorMessage | Error message |
| :----------------------------+-----------------------------------------:
| | errorMessageColor | Error message color |
| :----------------------------+-----------------------------------------:
| | errorMessageTextSize | Error message text size |
| :----------------------------+-----------------------------------------:
| | buttonText | Button text |
| :----------------------------+-----------------------------------------:
| | buttonTextColor | Button text color |
| :----------------------------+-----------------------------------------:
| | buttonTextSize | Button text size |
| :----------------------------+-----------------------------------------:
| | buttonMarginStart | Button margin start |
| :----------------------------+-----------------------------------------:
| | buttonMarginEnd | Button margin end |
| :----------------------------+-----------------------------------------:
| | buttonMarginBottom | Button margin bottom |
| :----------------------------+-----------------------------------------:
| | buttonMarginTop | Button margin top |
'---------------------------'----------------------------'-----------------------------------------'

.---------------------------.----------------------------.-----------------------------------------.
| Class | Attribute | Description |
:---------------------------+----------------------------+-----------------------------------------:
| AlviereTextViewCustomize | textColorRes | text color resource |
| :----------------------------+-----------------------------------------:
| | textSizeRes | Text size resource |
| :----------------------------+-----------------------------------------:
| | textColor | Text color |
| :----------------------------+-----------------------------------------:
| | textSize | Text size |
'---------------------------'----------------------------'-----------------------------------------'

.---------------------------.----------------------------.-----------------------------------------.
| Class | Attribute | Description |
:---------------------------+----------------------------+-----------------------------------------:
| AlviereButtonCustomize | textRes | Button text resource |
| :----------------------------+-----------------------------------------:
| | textColorRes | Button text color resource |
| :----------------------------+-----------------------------------------:
| | textSize | Button text size resource |
| :----------------------------+-----------------------------------------:
| | backgroundDrawable | Button background drawable |
| :----------------------------+-----------------------------------------:
| | marginStartRes | Button margin start resource |
| :----------------------------+-----------------------------------------:
| | marginEndRes | Button margin end resource |
| :----------------------------+-----------------------------------------:
| | marginBottomRes | Button margin bottom resource |
| :----------------------------+-----------------------------------------:
| | marginTopRes | Button margin top resource |
| :----------------------------+-----------------------------------------:
| | height | Button height resource |
| :----------------------------+-----------------------------------------:
| | text | Button text |
| :----------------------------+-----------------------------------------:
| | textColor | Button text color |
| :----------------------------+-----------------------------------------:
| | textSize | Button text size |
| :----------------------------+-----------------------------------------:
| | marginStart | Button margin start dimension |
| :----------------------------+-----------------------------------------:
| | marginEnd | Button margin end dimension |
| :----------------------------+-----------------------------------------:
| | marginBottom | Button margin bottom dimension |
| :----------------------------+-----------------------------------------:
| | marginTop | Button margin top dimension |
| :----------------------------+-----------------------------------------:
| | height | Button height dimension |
'---------------------------'----------------------------'-----------------------------------------'

.------------------------------------.----------------------------.--------------------------------.
| Class | Attribute | Description |
:------------------------------------+----------------------------+--------------------------------:
| AlviereTextInputEditTextCustomize | textColorRes | Input text color resource |
| :----------------------------+--------------------------------:
| | textSizeRes | Input text size resource |
| :----------------------------+--------------------------------:
| | textColor | Input text color |
| :----------------------------+--------------------------------:
| | textSize | Input text size |
'------------------------------------'----------------------------'--------------------------------'

.------------------------------------.----------------------------.--------------------------------.
| Class | Attribute | Description |
:------------------------------------+----------------------------+--------------------------------:
| AlviereEditTextCustomize | textColorRes | Edit text color resource |
| :----------------------------+--------------------------------:
| | textSizeRes | Edit text size resource |
| :----------------------------+--------------------------------:
| | textColor | Edit text color |
| :----------------------------+--------------------------------:
| | textSize | Edit text size |
'------------------------------------'----------------------------'--------------------------------'

Packages