Forum Xamarin.Android


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Print in Epson TM-U220 with Xamarin

cmasdevcmasdev PYMember ✭✭
edited May 2015 in Xamarin.Android

Hi everyone, I have a problem with my printer (USB). I followed all documentation but I'm missing something. I can't make it work.
I have two Xamarin's projects.

  1. Android Java Bindings Library with the following tree structure:
    a. Jars/EPOS-Print.jar
    b. libs/armeabi/

  2. Android Application, that calls to that JBL project. I have the following lines of code:

    using Com.Epson.Epsonio;
    using Com.Epson.Eposprint;
    namespace EpsonPrint
        [Activity(Label = "EpsonPrint", MainLauncher = true, Icon = "@drawable/icon")]
        public class MainActivity : Activity
            static Print printer = null;
            string openDeviceName = string.Empty;
            int connectionType = Print.DevtypeUsb;
            int language = Builder.LangEn;
            String printerName = "TM-U220";
            Print getPrinter(){
                return printer;
            protected override void OnCreate(Bundle savedInstanceState)
                //Java.Lang.JavaSystem.Load("libs/armeabi/"); //This line of code fails because '' is missing???
               Button button = FindViewById<Button>(Resource.Id.myButton);
               Finder.Start(BaseContext, DevType.Usb, "null"); //BOOM!
               button.Click += delegate

    Can anyone helps me?


  • cmasdevcmasdev PYMember ✭✭

    I have an EpsonIoException Exception.

    Now the problem is with .so file. The system (android) cannot find the file.

  • cmasdevcmasdev PYMember ✭✭

    Any developer couldn't help so there is no solution to this on Xamarin.Android.

  • MatthieuFilionMatthieuFilion CAMember, University


    First of all, I don't have any knowledge about the ePOS-Print SDK, but is there a reason why the last parameter of Finder.Start() is in quotes ?
    According to the Android example coming with the SDK, it should simply be null.
    Unless there is something different when using the SDK with Xamarin.

    Hope that helps

  • Hello, Cristian, you found a solution? I have the same problem

  • pepeluchepepeluche MXMember ✭✭

    i have the same problem can anybody helps, any other link

  • cmasdevcmasdev PYMember ✭✭

    This is the code that I used for:

        //Pass ip address and port number
        var sock = new Socket (ip_printer, int.Parse(printer_port));
        oStream = new PrintWriter (sock.OutputStream, true);
        //Start printer
        oStream.Print("Test Printer: OK");
        // ESC command for remove paper from printer.
         // ESC command to finish printer job.
         // Clear elements
         oStream.Flush ();
         oStream.Close ();
         sock.Close ();
     catch(Exception ex)
         // Throw exception here! 

    In this case, I used my phone as WIFI spot connected to Print Server device (connected to the Epson TMU-220).

    Hope it helps

  • pepeluchepepeluche MXMember ✭✭

    muchas gracias amigo

  • SaveSave THMember
    edited December 2017

    Hi i try to connect epson tm-t82
    How could you solved this line
    //Java.Lang.JavaSystem.Load("libs/armeabi/"); //This line of code fails because '' is missing???
    I'm stuck when loading .so file too.

  • dinobdinob USUniversity ✭✭✭

    @cmasdev Hi, can you provide any links/instruction how to integrate this into Xamarin.Forms please? Thanks

Sign In or Register to comment.