Sub Process_Globals
Dim BTSerialPrinter As Serial
Dim PrinterWriter As TextWriter
End Sub
Sub Globals
Dim BTPortPrinter As Int
Dim BTMacPrinter As String
End Sub
Sub Activity_Create (FirstTime As Boolean)
If (FirstTime = True) Then
BTSerialPrinter.Initialize("BTSerialPrinter")
End If
End Sub
Sub ButtonConnectBTPrinter_Click
BTMacPrinter = (printer mac address)
BTPortPrinter = 1
BTSerialPrinter.Connect3(BTMacPrinter,BTPortPrinter)
End Sub
Sub BTSerialPrinter_Connected (Success As Boolean)
If (Success = True) Then
PrinterWriter.Initialize(BTSerialPrinter.OutputStream)
Else
If BTPortPrinter < 10 Then
BTPortPrinter = BTPortPrinter + 1
BTSerialPrinter.Connect3(BTMacPrinter,BTPortPrinter)
End If
End If
End Sub