Easy Tool SDK (App to App)
This document will help you integrate and use the Easy Tool SDK in your Android applications.
Introduction
The Easy Tool SDK is a secure Android SDK designed for seamless communication with Easytool app. It provides a simple API for printing text, raw bytes, images, controlling cash drawers, and managing sessions with type-safe callbacks.
Installation
Gradle
Add the following to your app's build.gradle file:
dependencies {
implementation 'sa.easypay:easypay-toolsdk:1.6.0'
}Maven
<dependency>
<groupId>sa.easypay</groupId>
<artifactId>easypay-toolsdk</artifactId>
<version>1.6.0</version>
</dependency>Permissions
Ensure the following permissions are added to your AndroidManifest.xml:
Getting Started
Initialize the SDK
To start using the SDK, initialize it with your subscription number:
Printer Selection
Prompt the user to select a printer:
Core Features
Print Operations
Print Text
Print Bytes
Print Image
Open Cash Drawer
PrintListener Example
Session Management
Sign out and clear all session data:
Advanced Usage
Custom Error Handling
Base64 Data Preparation
Error Handling
The SDK provides comprehensive error handling with automatic recovery. Initialization failures trigger complete state cleanup, and sign out errors still perform local cleanup.
Version History
1.5.0: Added robust Easy Tool app installation check and user prompt
1.4.0: Enhanced security, improved error handling
1.3.0: Added sign out functionality, enhanced error recovery, version centralization
1.2.0: Enhanced security, improved error handling
1.1.0: Added Base64 image support, optimized flow
1.0.0: Initial release
Last updated