I ask you to forgive me for the mistakes made in previous versions of the program. At the moment I have written a test suite. Each test in the application checks one of the methods of interaction with the program.
On this page I will not repeat the texts of the examples. I will describe only the interaction features.
Google Play: Test RawBT
In Android 4.4 (API level 19) and higher, the framework provides services for printing images and documents directly from Android applications. Being able to print information from your Android application gives users a way to see a larger version of the content from your app or share it with another person who is not using your application. Printing also allows them to create a snapshot of information that does not depend on having a device, sufficient battery power, or a wireless network connection.
If you implement the standard method, you can print not only through my application, but to any printer.
Please note that the function text is different from the example in the official documentation.
I have written a complete application to illustrate this example. The source code of the program is available on GitHub . The application is available in the market and really used as an extension to RawBT (option for editor).
Google Play: Text To Print
I'll show you my function of parsing the data that came into the application.
The printer does not understand the UTF-8. The program converts them into one byte encoding of your language.
For most languages, there is a problem with ESC/p command contained characters from the range [128-255].
If such characters are processed separately, then the problem is with the Portuguese language( and others languages used symbols U+00C0 - U+00FF ).
But it is better to use ready-made classes from printer manufacturers SDK for these purposes.