Android Question What is involved in building a library around a JAR used in Android Studio

Kevin Hartin

Active Member
Licensed User
I have finally got my sample of an integrated Android device (Telpo TPS320) with a built in printer and Smart Card reader. It takes a while to get from China to Samoa via New Zealand... but it is a nice little device, perfect for the development of a Invoicing system with simple POS capabilities that is being forced up on small businesses (mainly village shope) here in Samoa from October this year. The two key components that I have to access are the printer, which apparently has a USB interface and the SmartCard Reader, which I haven't even had a look at yet.
TPS320.png

Along with this I received a SDK with an extensive set of "Demo examples" to print, read the smartcard etc. which works fine however I really want to use B4A to develop the app I have planned around this device, as I find the Android Studio somewhat cumbersome and far too daunting for my abilities.

In the SDK, I find these three JARs in the lib directory.
1621197848344.png

When I troll through the "Demo example" code, I can see that these get loaded and can sort of follow how the examples get printed, while in the "Documentation" there is about 8 pages devoted to the USBprinter (attached), which I hope has enough information to be able to build a "Wrapper" or whatever is needed to make a B4X library. The full API document is at https://bookingsamoa.com/downloads/kev/Telpo_POS_Development_Guide_V1.08(20180530).pdf and the SDK at https://bookingsamoa.com/downloads/kev/TelpoDemoSDK(20201209).zip

Now before you all say to connect directly to the printer and send the ESC/POS commands as I have done with other apps, I have tried using the USBserial and USBprint library and failed to recognise the device, as when using a hardware scanner app it appears as a USB hub rather than a printer. I guess it is not a simple connection like an external printer on my Samsung.
TPS320printer.jpg

I hope someone out there can shed some light on this, as I will also need to do the same for the Card Reader as well.

If it comes to being beyond my limited capabilities, I am willing to pay someone to wrap up these JARs into libs that I can use in B4A. I have requested the source from the manufacturer in order to do this. I am confident that they will help out in order to secure a large order in the coming months...

Thanks,
Kev
 

Attachments

  • Telpo_USB_Printer.pdf
    263.8 KB · Views: 487

JohnC

Expert
Licensed User
Longtime User
 
Upvote 0
Top