iOS Question Bluetooth ESC/POS Printer Class

MarcoRome

Expert
Licensed User
Do you tried so:

B4X:
Sub Ble_PrinterFound(Name As String, ID As String)
    LabelInfo.Text=$"Found printer: ${Name}"$
    if Name.Contains("NameyourPrinter") then 
       Ble.connect(ID)
    else 
       'Search Again
       Ble.ScanPrinter
    End if  
End Sub
 
Upvote 0

Ali Alsaedi

Member
Licensed User
Is it not possible to display the list of devices and select the user? In this case, the Ble.Scan command must be called until the desired print is found
 
Upvote 0

Star-Dust

Expert
Licensed User
B4X:
Sub Ble_PrinterFound(Name As String, DeviceID As String)
    Dim PrinterMap As Map
    PrinterMap.Put(Name,DeviceID)

    ' List of printer

    For Each Device As String In PrinterMap.Keys
        Log($"DeviceName: ${Device}    DeviceID:${PrinterMap.Get(Device)}"$)
    Next
End Sub
 
Last edited:
Upvote 0

Similar Threads

Top