0
I’m making an application that needs to print the contents of a webview , but the printer is bluetooth , could help me?
0
I’m making an application that needs to print the contents of a webview , but the printer is bluetooth , could help me?
1
Printing in bluetooth on android is not a simple thing, nor so little easy to be done.
I’ll leave here a path so you can achieve your goal:
There is a library that makes communication with Bluetooh directly already. But for curiosity, you have to list the bluetooth devices and after finding them, you have to open a socket for them and send the print. This library makes all this work easier.
As a web page is already rendered, and as the interest is to print it formatted, not the source code, you would have to generate an image of this html. If you use. This answer of Soen will show you how to do this.
After taking a snapshot of your webview, you send it to the library in 1, calling the printImage(Bitmap method).
Browser other questions tagged android
You are not signed in. Login or sign up in order to post.
There is a similar issue on the subject at this link here how android use Bluetooth Printer print the Webview content check if it helps you.
– escapistabr
That hence it looks for printers on Wifi, need it to be on bluetooth , thanks for the force
– Paiva