Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Page Properties
hiddentrue

Status

DRAFT

Approver

Mahdi Abolfazli

Overview

Please make sure to contact Gini customer support to enable this feature in our backend platform.

...

  1. Attach a document during the Photo Payment flow. Here, 3 options: “Attach files”, “Always attach”, “Don’t attach files”, are available.

  2. View the attached document on the Transaction Summary screen .

  3. Open the attached document in a full screen mode from the Transaction Summary screen when tapping on the already attached file.

  4. Delete an attached document from the Transaction Summary screen.

...

Enabling/Disabling the feature

Info

Please note that in GiniBankSDK this feature is enabled by default in the SDK in the transactionDocsEnabled property with the true value.

...

Code Block
var captureConfiguration = CaptureConfiguration(
            transactionDocsEnabled = false,
            ....
        )
GiniBank.setCaptureConfiguration(context, captureConfiguration)

Transaction Docs attachment settings

Value of three options for attaching a document (namely: “Attach files”, “Always attach”, “Don’t attach files”) is in the current version of the Transaction Docs feature stored locally on end user’s device. It can be accessed through the GiniBank’s transactionDocs.transactionDocsSettings instance, using the getAlwaysAttachSetting() method:

Code Block
languagekotlin
val alwaysAttach: Boolean = runBlocking {
            GiniBank.transactionDocs.transactionDocsSettings.getAlwaysAttachSetting().first()
        }

This retrieves the user’s preference for automatically attaching documents to future transactions. To update the stored value for the 'Always attach' option, you can use the setAlwaysAttachSetting(value: Boolean) method from the public method in GiniBanktransactionDocs.transactionDocsSettings, like this:

Code Block

fun setAlwaysAttachSetting(context: Context, isChecked: Boolean) {
        configureGiniBank(context) // Gini Bank should be configured before using transactionDocs
        viewModelScope.launch {
            GiniBank.transactionDocs.transactionDocsSettings.setAlwaysAttachSetting(
                isChecked
            )
        }
    }

Attachments view component

You can use a our new Attachments view component anywhere in the application. named TransactionDocsView in the transaction summary screen.

Info

Please note that Gini does not manage the download and persistent storage of attached documents, yet. This responsibility should be handled on your side.

This new component allows end users to:

  • see View an attached document along with its file name and extension

  • delete Delete an attached document after by tapping on the “More” optiontap on the the options button or directly from the document preview screen

  • Tap on an attached document to see open a document preview preview for a closer look

First, when initializing the transaction summary screen in your app, you must add a custom view for presenting the transaction docs-related UI using the net.gini.android.bank.sdk.transactiondocs.ui.extractions.view.TransactionDocsView.

Find out how to customize this feature here.