Statistics for Fiserv Acquiring

Depending on the form of integration contracted, it will be necessary to send statistical data from the device and transactions for Acquiring control. To perform this task, automation needs to activate this functionality in CliSiTef. This guide aims to teach you how to integrate and enable device statistics collection for Fiserv acquirers using CliSiTef. Below you will find information about the required permissions, required dependencies and an example of integration with CliSiTef to enable this feature.

Required permissions#

Before you can integrate CliSiTef with statistics into your Android app, you need to add the appropriate permissions to your app manifest. These permissions ensure that the app has access to the resources necessary to collect and analyze device data. Remember that if the application is installed on a device running Android 6.0 (API level 23) or newer, it will be necessary to request "dangerous" permissions at run time by following the steps in the guide on the Android developer portal (https ://developer.android.com/training/permissions/requesting?hl=pt-br). The permissions required for library integration are as follows:

<uses-permission android:name="android.permission.READ_PHONE_STATE"/> // Protection level: Dangerous
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />// Protection level: Dangerous
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />// Protection level: Dangerous

Dependencies#

Make sure the Android library in .aar format provided by Fiserv is added to your project. You can do this by following the steps below:

  • Copy the library's .aar file to your project's "libs" folder.
  • Open the build.gradle file of the application module.
  • Add the following line in the dependencies block:
implementation files('libs/statisticsLibrary-release.aar') //.aar file name may vary depending on version or target device

Make sure to also add library dependencies to the project.

implementation "androidx.room:room-runtime:2.4.3"
implementation "androidx.room:room-ktx:2.4.3"
implementation "io.insert-koin:koin-android:"3.2.0""
implementation "io.insert-koin:koin-android-compat:3.2.0"
implementation 'androidx.preference:preference:1.2.1'
implementation 'com.google.code.gson:gson:2.10.1'
implementation "androidx.work:work-runtime-ktx:2.7.1"

Important: Make sure to add the CliSiTef dependencies to your project, as well as the shared libraries provided by the manufacturer.

This library uses the manufacturer's USDK resources to collect data from the terminal and printer, so these manufacturer services or libraries need to be initialized beforehand as in the following example for DX8000. These are generally the same functions that the application must use to enable printing:

public class BaseApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
//Solução para usar USDK da ingenico (DX8000) impressora e etc..
com.ingenico.lar.apos.DeviceHelper.me().init(getApplicationContext());
com.ingenico.lar.apos.DeviceHelper.me().bindService();
}
}

Integration example#

Here is an example of using it in Java to enable the library in the project

import br.com.softwareexpress.sitef.android.CliSiTef;
import com.fiserv.statisticslibrarybin.model.BinAnalytics;
// ...
// Library initialization
BinAnalytics analytics = BinAnalytics.configure(context)
//Initialize CliSiTef and report analytics in the constructor
CliSiTef cli = new CliSiTef(context, analytics);

Make sure to replace context with the application context of your application.

In this example, we use the configure method to initialize the BinAnalytics library and the CliSiTef(context, analytics) constructor to inform CliSiTef that it should collect transaction statistics. Remembering that CliSiTef must only be initialized once in the application, the next time the CliSiTef getInstance() method must be used.

CliSiTef device and minimum version#

Below are the minimum versions required to use the sending of device and transaction statistical data for Acquiring control.

DeviceCliSiTef Minimum Version
DX80007.0.117.76.r2