1. Documentation
  2. Devices
  3. Printing Service
  4. Guides

Guides


AEVI Printing Service

Introduction

This documentation is for Android developers who are writing apps that need to print to either an external POS printer or to a POS device built-in printer. The AEVI Printing Service implements the new AEVI Printer API which is designed to enhance and replace the existing AEVI SDK 2.x printing API.

The advantage of this print service and API are as follows:

  • Works on AEVI-enabled devices and generic Android tablets and not just the AEVI Albert.
  • The printing API now supports multiple printers.
  • Allows printing to external network POS receipt printers.
  • Support for a printer's multiple fonts.
  • The Legacy Adaptor (optional) allows SDK 2.x apps to print on generic Android devices.

Printer API

For details please see the AEVI Printer API documentation. This API has been released using an open source license and is available on GitHub here.

Printer driver API

This API is only needed when writing a new printer driver and most developers will not need to use this API. The API has been released using an opened sourced license and is available from GitHub here.

Supported printers

Below is a list of supported printers. (More drivers for other POS printers will be available soon.)

  • Epson Printers -- The Epson TM-T20, TM-m30 & TM-T88 network & bluetooth printers.
  • Star Printers -- The Star TSP100III Series network printers.
  • Albert printer -- The AEVI Albert built-in printer.
  • Carbon printer -- The Verifone Carbon 8 and Carbon 10 built-in printers.
  • Seiko Instruments Inc (SII) printer -- The SII RP-D10, RP-E10/11, DPU-S445 & DPU-S245 network & USB printers.
  • Pax printer -- The Pax A920 POS device built-in printer.

Note: Due to PCI restrictions the Albert does not support any bluetooth or USB printers.

Emulated printer driver

An emulated printer driver is available which allows testing of the print API without using any printing hardware by displaying the printout on screen. This can be installed and configured to emulate a selection of the supported printers.

Installation

The following apks can be downloaded from this AEVI site and will need to be installed manually using adb. The order of installation is not important (apart from the Legacy Print Adaptor; See below).

  • Printing service -- Is a service based Android application which implements the user API and the driver API. It also includes a basic UI to view installed drivers.
  • Printer Drivers -- There needs to be a printer driver installed for each manufacture of printer.
  • Legacy Print Adapter -- This optional apk is only required to support existing apps that use the AEVI SDK 2.x and is not needed for apps using only this new Printer API. The Legacy Print Adapter must be installed before any of the existing SDK 2.x apps.

Note: Devices that are managed by AEVI Agent including the Albert Developer Device these apks will be installed automatically.

Albert specific instructions

Due to security restrictions on the Albert, automatic scan for printers is not available. Instead the IP address of the printer must be manually entered by the merchant on the Albert. For this reason it is recommended that the router is configured to assign a static IP address to the printer. If the printer IP address does change following a router restart then the new IP address will need to be re-entered by the merchant.

The Legacy Printer Adapter is not available for the Albert and so when using the existing SDK 2.x apps the default printer is always the Albert's built-in printer.

Upgrading from the AEVI SDK 2.x API

The steps below show to how upgrade an existing app to use the new printing service api:

  • Add the following build.gradle as shown in the Printer API documentation.
maven {
    url "http://dl.bintray.com/aevi/aevi-uk"
}
implementation 'com.aevi.print:print-api:1.1.4'
  • Remove the old the manifest printer permission and replace with this printer permission com.aevi.permission.NGS_PRINT_SERVICE.

  • The PrintPayload and related classes are similar to the SDK 2.x classes and can be changed by updating the package name to com.aevi.print.model.

  • The new PrintPayload has a new optional method setPrinterId() to support for multiple printers. If this is not set then the default printer will be used.

Note: the SDK 2.x jar files that are located in the libs folder can be used along side the new printing services and may still be required for the payment API.