Search code examples
javaxamarindlljarpos

Printing to POS Printers in Xamarin Forms Android


I have an app that is built with XF and I want it to be able to discover POS Printers through LAN, USB and maybe WIFI too, and print receipts with a very simple template. Does anyone have any leads ? there is this ePOS Android SDK :

https://download.epson-biz.com/modules/pos/index.php?page=prod&pcat=3&pid=36

But it's with JAVA. And I also found this nugget ESC-POS :

https://github.com/lukevp/ESC-POS-.NET

If there is anyone who have any idea on how I should proceed or already done it before I would really really appreciate it.


EDIT

So I deicided to work with the SDK found on EPSON website. I have 2 files .JAR

  • ePOS2.jar Compiled Java class file, archived into a jar format file to allow APIs to be used from Java programs.

  • ePOSEasySelect.jar A Java class file for selecting a printer easily

and some other lib files .so . All I got to do now is find the correct way to use theme in my Xamarin app. so I found this :

https://learn.microsoft.com/fr-fr/xamarin/android/platform/binding-java-library/binding-a-jar

can anyone with further experience help me with that please ?


Solution

  • Well I was able to creat a .dll file and add it as a reference in my xamarin.android project :

    https://learn.microsoft.com/en-us/xamarin/android/platform/binding-java-library/binding-a-jar

    Also I had to do some quick tweaking in the metadata file as mentionned in this thread :

    Epson ePOS SDK for Android (Xamarin) missing constants