I have ever printed by google cloud printing. you must have cloud printer or
computer attached printer and set cloud printer via crome browser before.
save file needed for print and use another application help to print.
Theera
As nfordbscndrd indicated, there are H-P and other printers that do tablet printing somewhat. I've got an app for basketball coaches, and I created the scoresheet on a canvas. Using "can1.Bitmap.WriteToStream(out1,100,"PNG")", the screen is saved. Then using "Gallery" or another photo viewer-program, you can print to one of the tablet printers. Hope this helps.
Tom
If you have any tips on how you accomplished that would be greatly appreciated. I have been trying to get Bluetooth communication to some portable thermal printers with no luck yet.
I am using a Citizen CMP10 and CMP20 - thermal POS Printer. First I pair it with my Android device then when I want to print I run the StartPrinter sub to connect then use pprint to send a line to the printer - like in the saleprint sub.
I am also exploring using the BTAdmin to automatically find the printer for me so I might not have to manually pair them together
B4X:
Sub Process_Globals
Dim cmp20 As Serial
Dim printer As TextWriter
End Sub
Sub Printer_Connected (Success As Boolean)
If Success Then
ToastMessageShow("Connected successfully", False)
printer.Initialize(cmp20.OutputStream)
Else
Msgbox(LastException.Message, "Error connecting.")
End If
End Sub
Sub StartPrinter
Dim PairedDevices As Map
Dim l As List
Dim res As Int
Try
PairedDevices = cmp20.GetPairedDevices
Catch
End Try
If PairedDevices.Size = 1 Then
cmp20.Connect(PairedDevices.Get(PairedDevices.GetKeyAt(0)))
Else
l.Initialize
For i = 0 To PairedDevices.Size - 1
l.Add(PairedDevices.GetKeyAt(i))
Next
res = InputList(l, "Choose device", -1)
If res <> DialogResponse.CANCEL Then
cmp20.Connect(PairedDevices.Get(l.Get(res)))
End If
End If
End Sub
Sub pprint(xString As String)
printer.WriteLine(xString)
printer.Flush
End Sub
Sub SalePrint_Click
For xc=0 To slList1.Size - 1
pprint(slList1.GetItem(xc))
Next
End Sub
I am having a hard time also to print my documents and I am looking forward to see some help in here. I have tried also to use Bluetooth communication to some portable thermal printers but I still don't have luck.
I have a POS program running on Android devices (phones and tablets) that store data in a SQLite database and print to a battery operated thermal printer.
May i know how did you do it? the printing of your POS application to thermal printers using bluetooth. I am new to basic 4 android. I hope you can help me.
The printers I am using are receipt printers and I send information directly to them. Any special codes must be in the string of characters that I send.
If you are talking about HTML you would need to have some conversion to the printer language
There is a program called printbot that you can print from your phone to an IP printer. I think this is what he is trying to do. Be able to print something out. It's a little program that runs and gives you to option to print things instead of showing them onscreen.