The Device Library simplifies device information management by utilizing the Device Info Service for efficient data handling. This document outlines how to use the available functions.
The DeviceInfoService enables applications to retrieve detailed device information such as IMEI, IMSI, EMVCL version, fiscal ID, ROOTFS version, and more. It supports both single-field queries and batch requests, providing an easy way to access important device details. The service also allows configuring the terminal and merchant IDs for the application.
Integration Guide
Copy most recent aar lib file into your project.
Make sure you include aar lib in your Project. In this example project, it is done in /app/.build.gradle file like this:
The PosModeEnum defines various modes representing specific regulatory, functional, and technical implementations for POS systems.
VUK507 refers to compliance with the 507th circular under the Tax Procedure Law (Vergi Usul Kanunu). It enables businesses to issue e-documents (e-invoices, e-archives) and process payments through secure and integrated systems. This mode is commonly used in Android-based applications or devices to reduce costs by eliminating the need for physical POS terminals. It is ideal for businesses aiming to digitize financial operations in accordance with Turkish tax regulations.
POS represents traditional Point of Sale systems. These systems are used for in-store payment processing and sales tracking while integrating with inventory control and other retail management tools. This mode is suitable for retail businesses operating with physical POS hardware or software solutions.
GIB denotes integration with the Gelir İdaresi Başkanlığı (Revenue Administration of Turkey). This mode ensures compliance with government standards for secure financial transactions, tax reporting, and electronic document exchange. It is used in scenarios requiring direct communication with government systems for tax and audit purposes.
ECR, or Electronic Cash Register, is designed for managing sales and printing fiscal receipts in compliance with tax regulations. These systems are often used in retail environments where real-time tax reporting is mandatory through integration with government systems.
EFT_POS stands for Electronic Funds Transfer at Point of Sale. This mode supports secure electronic payment transactions through credit or debit cards. It integrates with various payment systems to ensure seamless fund transfers between customers and businesses, making it ideal for operations focused on digital and card-based payment methods.
Card Redirection Mods;
publicstaticenumCardRedirect { NO, YES, NOT_ASSIGNED;}
The CardRedirect enumeration is used to define the status of card redirection during the payment processing flow, particularly when managing transactions across multiple active bank applications with card routing capabilities. This enumeration is relevant for determining whether a sales transaction is routed to a specific bank application after a contactless card is read. The values in this enum represent the routing behavior as follows:
NO indicates that card redirection is disabled. In this case, the transaction will not be routed to an external bank application and will proceed using the current bank's processing flow.
YES signifies that card redirection is enabled. When a card is read, the payment gateway will route the transaction to the appropriate bank application based on the card routing flow. This could be to a default contactless bank, issuer bank, or brand-specific bank, depending on the routing logic.
NOT_ASSIGNED represents an undefined or uninitialized state for card redirection. This status is typically used when the card redirection setting has not been configured yet, leaving the routing behavior to be determined at a later stage.
The Field class contains constants that represent different fields of device information that can be retrieved through the DeviceInfoService. These constants are used when querying specific data points related to the device's configuration and status. The following fields are defined:
SECURE_BOARD_VERSION refers to the version of the secure board in the device, which is essential for verifying the integrity and security of the hardware.
MODEM_VERSION represents the version of the modem in the device, which is useful for identifying the capabilities and compatibility of the device's communication module.
FISCAL_ID identifies the unique fiscal identifier of the device.
IMEI_NUMBER corresponds to the International Mobile Equipment Identity (IMEI) number, a unique identifier for the device used for mobile network operations.
IMSI_NUMBER stands for the International Mobile Subscriber Identity (IMSI) number, which is associated with the SIM card used for network identification.
DEVICE_MODE indicates the operational mode of the device, which can be development, testing, or production, defining the environment in which the device is currently operating.
FISCAL_VERSION specifies the version of the fiscal software or system running on the device, which is relevant for ensuring compliance with local fiscal regulations.
OPERATION_MODE describes the mode in which the device is operating, for payments, administrative tasks, or other specific functionalities.
SERVICE_MODE represents the service or customer mode of the device, indicating whether the device is operating in a service/maintenance mode or a customer-facing mode for transactions.
CARD_REDIRECTION indicates whether card redirection is enabled, determining if payment processing is routed to an external service for handling.
GET_EMV_KERNEL_VERSION specifies the version of the EMV kernel used in the device for processing card transactions.
GET_LINUX_KERNEL_VERSION refers to the version of the Linux kernel running on the device, which is important for understanding the underlying operating system and compatibility.
GET_ROOTFS_VERSION indicates the version of the root filesystem on the device, which includes the core system files and configurations.
GET_EMVCL_VERSION specifies the version of the EMV Contactless (EMVCL) protocol supported by the device, which is used for contactless card transactions.
The DeviceInfo is a constructor function which creates an instance of DeviceInfo class. It is recommended to reuse this instance when possible instead of creating a new one each time.
void setAppParams(DeviceInfoAppParamsSetterHandler deviceInfoResponseHandler, final String terminalId, final String merchantId)
The setAppParams function sets the payment application parameters, such as terminal ID and merchant ID, for the device. The result is returned asynchronously through the provided callback handler.