I am trying to print a turn number from my android kiosk/tablet. User just presses on an image button and the turn should be printed. The kiosk connects to a USB Epson TM-T20 printer.
I downloaded the sample EPOS2_Printer app that epson provides, and I built it's APK, it works fine on the kiosk, so I am trying to use its code and integrate it into what I am trying to do. The problem is I am unable to get the printer to be discovered and selected without user interaction.
The sample EPSON provides has a DiscoveryActivity, where the app searches for connected devices, you select the one you want from search results and that takes you back to main activity with the target field pre-filled. I am trying to stay in the same activity, and onClick, do the discovery and get target (only 1 printer) and print to it.
Reading this: Epson printer connect fails status ERR_CONN the comment below says to use Discover.start to get the target, but how can you integrate that with Printer.connect?
I can share code, just wanted to be as short as possible here.
Any help is appreciated!