Helcim Logo Support & Tutorials

© Copyright 2006-2018 Helcim Inc.

All Rights Reserved.

POS Hybrid Integration » Android »

Android Overview

Android uses its built-in Socket functions. It does not require any extra importing.

Make sure Application has permission to use internet!

To do this, open the android manifest file and add this line of code.

<uses-permission android:name="android.permission.INTERNET" />
Creating and initializing the class

// CREATE CLASS
hcmTerminal terminal;

// INITIALIZE CLASS
terminal = new hcmTerminal();
Settings needed for the class


// SAVE SETTINGS
terminal.terminalIp = "127.0.0.1";
terminal.terminalPort = 8080;
Processing different types *Some require you to set amount,clerkId,invoiceNumber

// PUCHASE
terminal.amount = 100;
terminal.clerkId = 525;
terminal.invoiceNumber = 111;
terminal.hcmPurchase();

// REFUND
terminal.amount = 100;
terminal.clerkId = 525;
terminal.invoiceNumber = 111;
terminal.hcmRefund();

// VOID
terminal.hcmVoid();

// PREAUTH
terminal.amount = 100;
terminal.clerkId = 525;
terminal.invoiceNumber = 111;
terminal.hcmPreAuth();

// CAPTURE
terminal.amount = 100;
terminal.clerkId = 525;
terminal.invoiceNumber = 111;
terminal.hcmCapture();

// SETTLE
terminal.hcmSettle();

// REPRINT
terminal.hcmRePrint();
Testing Connection *make sure ip and port are already set

// TEST CONNECTION
terminal.hcmTestConnection();

The result from testing the connection will be inside the connectionLog property