Inclusion in the project

To use CliSiTef in Android applications, it is necessary to include the following libraries in the project application construction:

  1. clisitef-android.jar in the classpath for the build process.
  2. Native libraries (libclisitef.so and other .so binaries), compiled for each supported platform, for inclusion in the apk package.

The core of CliSiTef is the native library libclisitef.so. Automation accesses it through the Java component included in the 'clisitef-android.jar' file, which essentially consists of a JNI layer for accessing functions from libclisitef.so and a module for managing the means of communication with the pinpad (USB, Bluetooth or internal interface).


Important: if developers are using the Eclipse IDE or Android Studio, it is worth mentioning that the .so dynamic libraries must be located in the folder corresponding to the architecture. Furthermore, binaries have cryptographic signature that is validated at run time. So they cannot go through the stripping process, as this can change the binary. In Android Studio, you must explicitly disable the strip by setting the android.packagingOptions.doNoStrip option in build.gradle file:

android {
...
packagingOptions{
doNotStrip "**/libclisitef.so"
}
}

Remembering that after including the option, it is necessary to perform a Sync and a Rebuild on the project.

The absence of this option (or equivalent in another IDE) will cause signature error at runtime with a message similar to:

Module signature error (-158), 00000000/00000000: libclisitef.so

libclisitef.so has builds for the following platforms: armeabi, armeabi-v7a, arm64-v8a, mips, mips64, x86 and x86_64. Developers must copy the binaries from each platform to the corresponding location of the IDE used. In Eclipse, the .so for each platform must be placed in the ./libs/<platform> directory. In Android Studio, the corresponding directory is typically located at ./<project>/src/main/jniLibs/<platform>. Examples:

  • Eclipse: .so binaries from the armeabi-v7a platform must be copied to the project's ./libs/armeabi-v7a.

  • Android Studio: .so binaries from the armeabi platform must be copied to

    ./app/src/main/jniLibs/armeabi (assuming the application project is ‘app’).

Regardless of the IDE, the <plat> platform .so binaries must be present in the ./lib/<plat> directory of the final .apk file.

The 'clisitef-android.jar' file, which is platform independent, must be included in the project's classpath.

It also comes with the package's javadoc, which can be incorporated into the development tool, so to facilitate the indication of methods and parameters during their development.